[BUGFIX] Extbase (Configuration): Make Extbase work again in Backend
authorSebastian Kurfürst <sebastian@typo3.org>
Tue, 21 Dec 2010 10:48:06 +0000 (10:48 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Tue, 21 Dec 2010 10:48:06 +0000 (10:48 +0000)
In case the extbase configuration could not be loaded,
we add it explicitely so that it works in all circumstances.

typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php

index da2bb6e..a4c36d8 100644 (file)
@@ -128,10 +128,19 @@ class Tx_Extbase_Configuration_BackendConfigurationManager extends Tx_Extbase_Co
        }
 
        /**
-        * We do not want to override anything in the backend.
+        * We need to set some default request handler if the framework configuration
+        * could not be loaded; to make sure Extbase also works in Backend modules
+        * in all contexts.
+        *
         * @return array
         */
        protected function getContextSpecificFrameworkConfiguration(array $frameworkConfiguration) {
+               if (!isset($frameworkConfiguration['mvc']['requestHandlers'])) {
+                       $frameworkConfiguration['mvc']['requestHandlers'] = array(
+                               'Tx_Extbase_MVC_Web_FrontendRequestHandler' => 'Tx_Extbase_MVC_Web_FrontendRequestHandler',
+                               'Tx_Extbase_MVC_Web_BackendRequestHandler' => 'Tx_Extbase_MVC_Web_BackendRequestHandler'
+                       );
+               }
                return $frameworkConfiguration;
        }
 }