Bug #53777
closedException: $toolbarItem "shortcuts" must implement interface backend_toolbarItem
0%
Description
Doing a clean install of 4.5.30 using the introduction-package at first it seems to work fine. Also the backend-login shows up fine. But upon trying to login I get:
Uncaught TYPO3 Exception
#1195126772: $toolbarItem "shortcuts" must implement interface backend_toolbarItem
UnexpectedValueException thrown in file
/var/www/html/typo3_src-4.5.30/typo3/backend.php in line 176.
Updated by Stefan Neufeind over 10 years ago
- PHP Version set to 5.5
Looks like an error with loading the classes? Hmm ...
This is on PHP 5.5.6. Same happens with introductionpackage for 4.5.20 or 4.5.31-dev (latest 4.5.x from git as of today) with also has autoload-fixes from Ernesto etc. Strange :-(
Updated by Peter Niederlag over 10 years ago
- Status changed from Closed to New
This is the API of ToolbarItemHookInterface (note it requires a reference to be passed in!):
TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface::__construct(\TYPO3\CMS\Backend\Controller\BackendController &$backendReference = NULL);
Root Cause of the problem is the way TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance() passes the arguments to the constructor:
$instance = $reflectedClass->newInstanceArgs($constructorArguments);
Basically for some reason php (under certain circumstances) fails to create the instance because the constructor argument is not a reference. The displayed Exeception just hides the real problem.
This problem is biting me for some days now on just about every installation on my local dev system using debian testing/unstable. I assume php somehow changed the way to handle references or the way to handle related errors. I could not nail it down to any specific change.
Updated by Peter Niederlag over 10 years ago
- Status changed from New to Closed
closed again as duplicate of #53682