Actions
Bug #48394
closedExceptions if EXT:context_help is not installed
Start date:
2013-05-20
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
If the context_help extension is uninstalled, the following two exceptions appear in error logs:
1:
Class 'TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider' not found Stacktrace (most recent call first): File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/Core/ClassLoader.php", line 171, in handleError class_alias($className, $aliasClassName); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/Core/ClassLoader.php", line 171, in autoload class_alias($className, $aliasClassName); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/Utility/GeneralUtility.php", line 4030, in getUserObj if (class_exists($class)) { File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 120, in generateAPI $serverObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($className, FALSE); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 172, in getExtDirectApi $javascriptNamespaces = $this->generateAPI($filterNamespaces); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 77, in getApiPhp $javascriptNamespaces = $this->getExtDirectApi($filterNamespaces); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/core/Classes/Page/PageRenderer.php", line 1397, in addExtDirectCode $api = $extDirect->getApiPhp($filterNamespaces); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 1585, in loadCshJavascript $this->pageRenderer->addExtDirectCode(); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 811, in startPage $this->loadCshJavascript(); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 946, in render $pageContent = $this->startPage($title, $includeCsh); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Controller/PageLayoutController.php", line 556, in main $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content); File "/var/lib/TYPO3/TYPO3-master/typo3/sysext/cms/layout/db_layout.php", line 143, in null $SOBE->main();
and
Invalid argument supplied for foreach() Stacktrace (most recent call first): File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 122, in handleError foreach (get_class_methods($serverObject) as $methodName) { File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 122, in generateAPI foreach (get_class_methods($serverObject) as $methodName) { File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 172, in getExtDirectApi $javascriptNamespaces = $this->generateAPI($filterNamespaces); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php", line 77, in getApiPhp $javascriptNamespaces = $this->getExtDirectApi($filterNamespaces); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/core/Classes/Page/PageRenderer.php", line 1397, in addExtDirectCode $api = $extDirect->getApiPhp($filterNamespaces); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 1585, in loadCshJavascript $this->pageRenderer->addExtDirectCode(); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 811, in startPage $this->loadCshJavascript(); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Template/DocumentTemplate.php", line 946, in render $pageContent = $this->startPage($title, $includeCsh); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/backend/Classes/Controller/PageLayoutController.php", line 556, in main $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content); File "/Users/dima/Projects/TYPO3/TYPO3-master/typo3/sysext/cms/layout/db_layout.php", line 143, in null $SOBE->main();
The problems happens because the bootstrap code registers the class named TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider without checking if it is available. While the namespace suggests it is in the 'cms' extension, it is actually in the 'context_help'.
Solution: check if the 'context_help' is loaded.
Actions