Project

General

Profile

Actions

Bug #48394

closed

Exceptions if EXT:context_help is not installed

Added by Dmitry Dulepov almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
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 #1

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20929

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20929

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22293

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22293

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22294

Actions #6

Updated by Anonymous over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF