[BUGFIX] Don't add TypoScript twice to defaultContentRendering 80/39680/3
authorMarkus Klein <markus.klein@typo3.org>
Sat, 23 May 2015 17:14:02 +0000 (19:14 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 24 May 2015 11:31:43 +0000 (13:31 +0200)
Calling the addTypoScript() method with last parameter set to
'defaultContentRendering' must not add the TypoScript twice.

Resolves: #67116
Releases: master, 6.2
Change-Id: I3161c62ac0ab25369fabc3f8163e5d92356aa0ca
Reviewed-on: http://review.typo3.org/39680
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index 755d55f..dd1ea00 100644 (file)
@@ -1426,11 +1426,12 @@ tt_content.' . $key . $suffix . ' {
 
 ' . $content;
                        if ($afterStaticUid) {
-                               $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $type . '.'][$afterStaticUid] .= $content;
                                // If 'content (default)' is targeted (static uid 43),
                                // the content is added after typoscript of type contentRendering, eg. css_styled_content, see EXT:frontend/TemplateService for more information on how the code is parsed
                                if ($afterStaticUid === 'defaultContentRendering' || $afterStaticUid == 43) {
                                        $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $type . '.']['defaultContentRendering'] .= $content;
+                               } else {
+                                       $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $type . '.'][$afterStaticUid] .= $content;
                                }
                        } else {
                                $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $type] .= $content;