[BUGFIX] Avoid calling frontend page preparations twice 98/56898/2
authorHelmut Hummel <typo3@helhum.io>
Wed, 9 May 2018 09:49:07 +0000 (11:49 +0200)
committerHelmut Hummel <typo3@helhum.io>
Wed, 9 May 2018 09:58:10 +0000 (11:58 +0200)
With the introduced cleanup, one removed condition was
essential to avoid calling page rendering preparations twice.

Resolves: #84945
Releases: master
Change-Id: Ic7b977b2d2c52dc619686f95e9001eed4202717b
Reviewed-on: https://review.typo3.org/56898
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Http/RequestHandler.php

index 94ce4c0..604b85b 100644 (file)
@@ -88,7 +88,10 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
 
         // Render non-cached page parts by replacing placeholders which are taken from cache or added during page generation
         if ($controller->isINTincScript()) {
-            $controller->preparePageContentGeneration();
+            if (!$controller->isGeneratePage()) {
+                // When page was generated, this was already called. Avoid calling this twice.
+                $controller->preparePageContentGeneration();
+            }
             $this->timeTracker->push('Non-cached objects');
             $controller->INTincScript();
             $this->timeTracker->pull();