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