[BUGFIX] Add missing getTemplatePathAndFilename() in TemplatePaths
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / View / AbstractTemplateView.php
index d6ab6cb..1e427a6 100644 (file)
@@ -50,7 +50,7 @@ abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\E
         if (!$context) {
             $context = GeneralUtility::makeInstance(ObjectManager::class)->get(RenderingContext::class, $this);
         }
-        $this->setRenderingContext($context);
+        parent::__construct($context);
     }
 
     /**
@@ -80,6 +80,8 @@ abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\E
         $this->controllerContext = $controllerContext;
         $this->baseRenderingContext->getTemplatePaths()->fillDefaultsByPackageName($request->getControllerExtensionKey());
         $this->baseRenderingContext->getTemplatePaths()->setFormat($request->getFormat());
-        $this->baseRenderingContext->setControllerContext($controllerContext);
+        if ($this->baseRenderingContext instanceof RenderingContext) {
+            $this->baseRenderingContext->setControllerContext($controllerContext);
+        }
     }
 }