[TYPO3-dev] Problems with autoloader in Backendmodul
Daniel Ritter
it.daniel.ritter at gmail.com
Thu Jan 29 09:58:27 CET 2015
I try to develope a backendmodul for my extension. But I've got a big problem. The Controller of the backendmodul is not loaded.:
[CODE]Uncaught TYPO3 Exception
#1289386765: Could not analyse class:Tx_InjectionAbcExt_Controller_ConfigController maybe not loaded or no autoloader? (More information)
TYPO3\CMS\Extbase\Object\Container\Exception\UnknownObjectException thrown in file
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php in line 37.
11 TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory::buildClassInfoFromClassName("Tx_InjectionAbcExt_Controller_ConfigController")
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Object/Container/Container.php:
00309: $classInfo = $this->getClassInfoCache()->get($classNameHash);
00310: if (!$classInfo instanceof \TYPO3\CMS\Extbase\Object\Container\ClassInfo) {
00311: $classInfo = $this->getClassInfoFactory()->buildClassInfoFromClassName($className);
00312: $this->getClassInfoCache()->set($classNameHash, $classInfo);
00313: }
10 TYPO3\CMS\Extbase\Object\Container\Container::getClassInfo("Tx_InjectionAbcExt_Controller_ConfigController")
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Object/Container/Container.php:
00151: return $this->singletonInstances[$className];
00152: }
00153: $classInfo = $this->getClassInfo($className);
00154: $classIsSingleton = $classInfo->getIsSingleton();
00155: if (!$classIsSingleton) {
9 TYPO3\CMS\Extbase\Object\Container\Container::getInstanceInternal("Tx_InjectionAbcExt_Controller_ConfigController", array)
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Object/Container/Container.php:
00106: public function getInstance($className, $givenConstructorArguments = array()) {
00107: $this->prototypeObjectsWhichAreCurrentlyInstanciated = array();
00108: return $this->getInstanceInternal($className, $givenConstructorArguments);
00109: }
00110:
8 TYPO3\CMS\Extbase\Object\Container\Container::getInstance("Tx_InjectionAbcExt_Controller_ConfigController", array)
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Object/ObjectManager.php:
00092: $instance = call_user_func_array(array('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 'makeInstance'), $arguments);
00093: } else {
00094: $instance = $this->objectContainer->getInstance($objectName, $arguments);
00095: }
00096: return $instance;
7 TYPO3\CMS\Extbase\Object\ObjectManager::get("Tx_InjectionAbcExt_Controller_ConfigController")
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php:
00094: protected function resolveController(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request) {
00095: $controllerObjectName = $request->getControllerObjectName();
00096: $controller = $this->objectManager->get($controllerObjectName);
00097: if (!$controller instanceof \TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface) {
00098: throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerException('Invalid controller "' . $request->getControllerObjectName() . '". The controller must implement the TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerInterface.', 1202921619);
6 TYPO3\CMS\Extbase\Mvc\Dispatcher::resolveController(TYPO3\CMS\Extbase\Mvc\Web\Request)
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php:
00065: throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @ignorevalidation or @dontvalidate (old propertymapper) annotation is missing on re-displaying a form with validation errors.', 1217839467);
00066: }
00067: $controller = $this->resolveController($request);
00068: try {
00069: $controller->processRequest($request, $response);
5 TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch(TYPO3\CMS\Extbase\Mvc\Web\Request, TYPO3\CMS\Extbase\Mvc\Web\Response)
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Mvc/Web/BackendRequestHandler.php:
00031: /** @var $response \TYPO3\CMS\Extbase\Mvc\ResponseInterface */
00032: $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
00033: $this->dispatcher->dispatch($request, $response);
00034: return $response;
00035: }
4 TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler::handleRequest()
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Core/Bootstrap.php:
00193: $requestHandler = $requestHandlerResolver->resolveRequestHandler();
00194:
00195: $response = $requestHandler->handleRequest();
00196: // If response is NULL after handling the request we need to stop
00197: // This happens for instance, when a USER object was converted to a USER_INT
3 TYPO3\CMS\Extbase\Core\Bootstrap::handleRequest()
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Core/Bootstrap.php:
00182: public function run($content, $configuration) {
00183: $this->initialize($configuration);
00184: return $this->handleRequest();
00185: }
00186:
2 TYPO3\CMS\Extbase\Core\Bootstrap::run("", array)
/mnt/clients/dri/desoi.de/typo3/sysext/extbase/Classes/Core/ModuleRunner.php:
00065:
00066: $bootstrap = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Core\\BootstrapInterface');
00067: $content = $bootstrap->run('', $configuration);
00068: print $content;
00069:
1 TYPO3\CMS\Extbase\Core\ModuleRunner::callModule("system_InjectionAbcExtInjectionabcadmin")
/mnt/clients/dri/desoi.de/typo3/mod.php:
00036: foreach ($TBE_MODULES['_dispatcher'] as $dispatcherClassName) {
00037: $dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get($dispatcherClassName);
00038: if ($dispatcher->callModule($moduleName) === TRUE) {
00039: $isDispatched = TRUE; 00040: break;[/CODE]
The entry in in ext_tables:
[PHP]...
if(TYPO3_MODE ==='BE'){
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
$_EXTKEY,'system',
'InjectionAbcAdmin',
'top',
array(
'Config' => 'show, exportArticles'
),
array(
'access'=> 'user',
'icon' => 'EXT:'.$_EXTKEY.'/ext_icon.gif',
'title' => 'InjectionABC',
'labels' => 'LLL:EXT:'.$_EXTKEY.'/Resources/Private/Language/locallang_mod.xlf'
)
);
}
..
[/PHP]
and the localconf:
[PHP]<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Vendor.' . $_EXTKEY,
'Injectionabcfrontend',
array(
'Article' => 'list',
'Config' => 'show, exportArticles',
),
// non-cacheable actions
array(
'Article' => 'list',
'Config' => 'show, exportArticles',
)
);[/PHP]
I debuged into the ClassInfoFactory.php and determined that the Controller of the backendmodul is the only class which is loaded in pi_base/underscore style.
Can someone explain this phenomenon?
More information about the TYPO3-dev
mailing list