[+BUGFIX] Extbase (MVC): view configuration (templateRootPath, ...) has to be set...
authorBastian Waidelich <bastian@typo3.org>
Sun, 14 Nov 2010 13:54:39 +0000 (13:54 +0000)
committerBastian Waidelich <bastian@typo3.org>
Sun, 14 Nov 2010 13:54:39 +0000 (13:54 +0000)
typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php

index b5930c3..2e6ab4b 100644 (file)
@@ -266,12 +266,14 @@ class Tx_Extbase_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controll
                $viewObjectName = $this->resolveViewObjectName();
                if ($viewObjectName !== FALSE) {
                        $view = $this->objectManager->create($viewObjectName);
+                       $this->setViewConfiguration($view);
                        if ($view->canRender($this->controllerContext) === FALSE) {
                                unset($view);
                        }
                }
                if (!isset($view) && $this->defaultViewObjectName != '') {
                        $view = $this->objectManager->create($this->defaultViewObjectName);
+                       $this->setViewConfiguration($view);
                        if ($view->canRender($this->controllerContext) === FALSE) {
                                unset($view);
                        }
@@ -282,8 +284,6 @@ class Tx_Extbase_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controll
                }
                $view->setControllerContext($this->controllerContext);
 
-               $this->setViewConfiguration($view);
-
                if (method_exists($view, 'injectSettings')) {
                        $view->injectSettings($this->settings);
                }