[BUGFIX] Respect cached page config 58/38958/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 27 Apr 2015 13:17:27 +0000 (15:17 +0200)
committerNicole Cordes <typo3@cordes.co>
Mon, 13 Jul 2015 15:19:35 +0000 (17:19 +0200)
On a cached page, initialise the page config only if it does not exist
yet. Merge the cached config with the template config to get the same
array as on a uncached page.

Releases: master, 6.2
Resolves: #66605
Change-Id: Idee4682cbfe5a8fb5f9522fc2f09e1c9bdb81396
Reviewed-on: http://review.typo3.org/38958
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index eb4e65e..2c0fe6b 100644 (file)
@@ -2493,9 +2493,12 @@ class TypoScriptFrontendController {
                                                throw new ServiceUnavailableException($message . ' ' . $explanation, 1294587217);
                                        }
                                } else {
-                                       $this->config['config'] = array();
+                                       if (!isset($this->config['config'])) {
+                                               $this->config['config'] = array();
+                                       }
                                        // Filling the config-array, first with the main "config." part
                                        if (is_array($this->tmpl->setup['config.'])) {
+                                               ArrayUtility::mergeRecursiveWithOverrule($this->tmpl->setup['config.'], $this->config['config']);
                                                $this->config['config'] = $this->tmpl->setup['config.'];
                                        }
                                        // override it with the page/type-specific "config."