[BUGFIX] Request format does not get passed to TemplatePaths 61/46361/3
authorClaus Due <claus@namelesscoder.net>
Fri, 29 Jan 2016 16:30:00 +0000 (17:30 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 29 Jan 2016 20:10:58 +0000 (21:10 +0100)
This adds an initialisation line to AbstractTemplateView which
passes the Request's format attribute value to the TemplatePaths
which are responsible for resolving the template file. Without it,
controllers were not able to render Requests using a format other
than html.

Change-Id: I1c0d4d5b3abf2c29d5c205e21d40b6fca16ca08a
Resolves: #73012
Releases: master
Related: #69863
Reviewed-on: https://review.typo3.org/46361
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php

index aae8042..d6ab6cb 100644 (file)
@@ -79,6 +79,7 @@ abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\E
         $request = $controllerContext->getRequest();
         $this->controllerContext = $controllerContext;
         $this->baseRenderingContext->getTemplatePaths()->fillDefaultsByPackageName($request->getControllerExtensionKey());
+        $this->baseRenderingContext->getTemplatePaths()->setFormat($request->getFormat());
         $this->baseRenderingContext->setControllerContext($controllerContext);
     }
 }