[BUGFIX] Fixed missing class mapping without TS
authorAlexander Schnitzler <alex.schnitzler@typovision.de>
Sun, 26 Aug 2012 17:01:55 +0000 (19:01 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 26 Aug 2012 19:47:06 +0000 (21:47 +0200)
If no Root template is found the class mapping
of extbase is not loaded, so e.g. the
persistenceManager is not found any more.

Change-Id: I51359e9e3bb6e11c32425bb5740047d5f0403750
Releases: 6.0
Fixes: #40236
Reviewed-on: http://review.typo3.org/14118
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/ext_localconf.php

index fe9c99d..d092373 100644 (file)
@@ -24,8 +24,12 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations
 // the code below is NO PUBLIC API! It's just to make sure that
 // Extbase works correctly in the backend if the page tree is empty or no
 // template is defined.
+/** @var $extbaseObjectContainer \TYPO3\CMS\Extbase\Object\Container\Container */
 $extbaseObjectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
 // Singleton
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\Query');
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\QueryResultInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\QueryResult');
+$extbaseObjectContainer->registerImplementation('TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface', 'TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager');
 $extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\BackendInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend');
 $extbaseObjectContainer->registerImplementation('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\QuerySettingsInterface', 'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
 unset($extbaseObjectContainer);