Bug #61441

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

Added by Simon Schick over 6 years ago. Updated over 1 year 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
#1

Updated by Mathias Schreiber about 5 years ago

  • Target version deleted (next-patchlevel)
#2

Updated by Gerrit Code Review almost 2 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

#3

Updated by Gerrit Code Review almost 2 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

#4

Updated by Gerrit Code Review over 1 year 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

#5

Updated by Benni Mack over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#6

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF