Project

General

Profile

Actions

Bug #61441

closed

Double stdWrap execution for USER-elements having "doConvertToUserIntObject" activated

Added by Simon Schick over 9 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2014-09-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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:

&lt;!--INT_SCRIPT.4c413e9494cf9827a0b9249260d55301--&gt;

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

fix.patch (989 Bytes) fix.patch Simon Schick, 2014-09-08 14:01
Actions

Also available in: Atom PDF