Bug #61441
closedDouble stdWrap execution for USER-elements having "doConvertToUserIntObject" activated
100%
Description
Hi, all
Today I discovered a rendering error for all TypoScript objects, defined as USER, where the instance of the user-object sets the value of "doConvertToUserIntObject" to TRUE.
I think the best is to go over it step by step. Think about an extbase-based plugin. The instance of this plugin calls the method "convertToUserIntObject()" in the FrontendRequestHandler, right?
When it now tries to render the instance in \TYPO3\CMS\Frontend\ContentObject\UserContentObject::render(), it falls into the condition, that re-generates this as an USER_INT object. The output now generated here is passed through the stdWrap-function for the first time. But the output, generated by the USER_INT generation is just a comment like
<!--INT_SCRIPT.4c413e9494cf9827a0b9249260d55301-->
Now, later on in the script, after the template is stored in the cache aso., the method \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::INTincScript_process() is called, which renders this one as a USER object, where the stdWrap, defined in the configuration, is applied again!
Another issue (not really of interest here, but still - it's possible), if the user now has an stdWrap configuration like this, the calling of the function INTincScript_process() won't catch this one:
stdWrap.htmlSpecialChars = 1
The stdWrap above, having wrapped around an extbase-extension would return an output like that to the browser:
<!--INT_SCRIPT.4c413e9494cf9827a0b9249260d55301-->
How to fix:
Please do not apply stdWrap in UserContentObject::render() if the doConvertToUserIntObject property is set to TRUE. The stdWrap function will be called once more inside of INTincScript_process().
Files
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60463
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60463
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60688
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a224d9557ee6323a58e08fa2caa16e70f4f79dfa.