[BUGFIX] Add additional TS for contentRenderingTemplates loaded by file 44/30544/2
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Tue, 3 Jun 2014 16:40:08 +0000 (18:40 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Wed, 11 Jun 2014 09:07:54 +0000 (11:07 +0200)
Loading extensions TS, that provide contentRenderingTemplates, like
css_styled_content, using INCLUDE_TYPOSCRIPT was fixed in
https://review.typo3.org/#/c/21679/.

Since making TS content templates more flexible in
https://review.typo3.org/#/c/27587/ the contentRenderingTemplates wasn't
added to "defaultTypoScript_setup." and "defaultTypoScript_constants."
arrays anymore and breaks the mentioned fix.

Solution is to check the required key in contentRenderingTemplates and
add the defaultContentRendering string now.

Resolves: #59318
Releases: 6.2
Change-Id: I8a367f462f304e07bbcec99fd26818bc98148eb4
Reviewed-on: https://review.typo3.org/30544
Reviewed-by: Benjamin Mack
Reviewed-by: Krzysztof Adamczyk
Tested-by: Krzysztof Adamczyk
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php

index 960c54c..4132d0e 100644 (file)
@@ -835,8 +835,8 @@ class TypoScriptParser {
 
                                                // load default TypoScript
                                                $defaultTypoScriptKey = implode('/', $filePointerPathParts) . '/';
-                                               if (isset($GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $includeType . '.'][$defaultTypoScriptKey])) {
-                                                       $newString .= $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $includeType . '.'][$defaultTypoScriptKey];
+                                               if (in_array($defaultTypoScriptKey, $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'], TRUE)) {
+                                                       $newString .= $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . $includeType . '.']['defaultContentRendering'];
                                                }
                                        }
                                }