Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COA_INT as wrapper on lib.contentElementWithHeader for no_cache? #738

Open
simonhantha opened this issue May 30, 2024 · 0 comments
Open

Comments

@simonhantha
Copy link

Hey guys,

my goal would be to disable cache for a specific (custom) content element on a page.

But if I try to wrap a lib.contentElementWithHeader with COA_INT I get the following exception:
Trying to access array offset on value of type null in /ext/headless/Classes/ContentObject/JsonContentContentObject.php line 146
-> $data['colPos' . $element['colPos']][] = $element;

That's probably because I get no values line 218
-> $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);

Currently the code with a custom element example (using ext mask) looks like the following combined with an answer from
https://stackoverflow.com/questions/57505896/typo3-howto-disable-cache-for-specific-content-element-on-a-page

file ts\ContentElements\mask_example.typoscript:

tt_content.mask_example =< lib.contentElementWithHeader
tt_content.mask_example {
fields {
content {
fields {
header = TEXT
header {
field = header
}
title = TEXT
title {
field = tx_mask_title
}
}
}
}
}

tmp.mask_example < tt_content.mask_example
tt_content.mask_example >
tt_content.mask_example = COA_INT
tt_content.mask_example {
10 < tmp.mask_example
10 =< lib.contentElementWithHeader
}

Can't I wrap the element in your opinion? Or should I modify the code in JsonContentContentObject?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant