[BUGFIX] Assure correct INCLUDE_TYPOSCRIPT with relative paths on subpages 32/44432/3
authorDaniel Goerz <ervaude@gmail.com>
Sat, 31 Oct 2015 13:43:07 +0000 (14:43 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 31 Oct 2015 19:01:54 +0000 (20:01 +0100)
If a subpage has a template that clears the setup, INCLUDE_TYPOSCRIPT
will not work with relative paths anymore. This patch assures that always
the correct file is included.

Change-Id: I43b524c7c0fde7211ccbfc8481e2bbfd00bb4c0e
Resolves: #71197
Releases: master
Reviewed-on: https://review.typo3.org/44432
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/core/Classes/TypoScript/TemplateService.php

index 0b68cbe..974849c 100644 (file)
@@ -647,11 +647,19 @@ class TemplateService
             $clConst = $row['clear'] & 1;
             $clConf = $row['clear'] & 2;
             if ($clConst) {
-                $this->constants = array();
+                // Keep amount of items to stay in sync with $this->templateIncludePaths so processIncludes() does not break
+                foreach ($this->constants as &$constantConfiguration) {
+                    $constantConfiguration = '';
+                }
+                unset($constantConfiguration);
                 $this->clearList_const = array();
             }
             if ($clConf) {
-                $this->config = array();
+                // Keep amount of items to stay in sync with $this->templateIncludePaths so processIncludes() does not break
+                foreach ($this->config as &$configConfiguration) {
+                    $configConfiguration = '';
+                }
+                unset($configConfiguration);
                 $this->hierarchyInfoToRoot = array();
                 $this->clearList_setup = array();
             }