[BUGFIX] Do not overwrite page title of USER plugins 38/37938/3
authorMarkus Klein <klein.t3@reelworx.at>
Wed, 18 Mar 2015 23:39:49 +0000 (00:39 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 26 Mar 2015 18:55:53 +0000 (19:55 +0100)
Re-inject the correct page title gathered from a cached page into the
TypoScriptFrontendController, such that when writing the page title
again to the PageRenderer the original value is not overwritten.

Releases: master, 6.2
Resolves: #62080
Change-Id: Iceb602ff7db9a4679eeb9ce6e2295790f71215f8
Reviewed-on: http://review.typo3.org/37938
Reviewed-by: Georg Schönweger <georg.schoenweger@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 48571a0..893ae11 100644 (file)
@@ -3338,7 +3338,11 @@ class TypoScriptFrontendController {
                $this->additionalCSS = $this->config['INTincScript_ext']['additionalCSS'];
                $this->divSection = '';
                if (!empty($this->config['INTincScript_ext']['pageRenderer'])) {
-                       $this->setPageRenderer(unserialize($this->config['INTincScript_ext']['pageRenderer']));
+                       /** @var PageRenderer $pageRenderer */
+                       $pageRenderer = unserialize($this->config['INTincScript_ext']['pageRenderer']);
+                       $this->setPageRenderer($pageRenderer);
+                       // restore current page title in this class to prevent overwriting custom titles of USER plugin coming from the cache
+                       $this->indexedDocTitle = $this->altPageTitle = $this->page['title'] = $pageRenderer->getTitle();
                }
                $this->recursivelyReplaceIntPlaceholdersInContent();
                $GLOBALS['TT']->push('Substitute header section');