Bug #66838
closedExtensionManager loads ext_autoload.php to late
0%
Description
When installing an extension, which depends on an extension with ext_autoload.php, the class-information in that file is not available soon enough.
I have an extension, which depends on realurl and also tries to import data with a data.t3d file in the Initialisation-folder.
Realurl registers a hook for process_datamap:
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_realurl'] = 'EXT:realurl/class.tx_realurl_tcemain.php:&tx_realurl_tcemain';
The constructor of this class relies on autoloading the tx_realurl_apiwrapper, which results in the following Error
Fatal error: Class 'tx_realurl_apiwrapper' not found in /typo3/typo3conf/ext/realurl/class.tx_realurl_tcemain.php on line 49 Call Stack # Function Location 1 main}( ) ../mod.php:0 2 TYPO3\CMS\Extbase\Core\ModuleRunner->callModule( ) ../mod.php:38 3 TYPO3\CMS\Extbase\Core\Bootstrap->run( ) ../ModuleRunner.php:67 4 TYPO3\CMS\Extbase\Core\Bootstrap->handleRequest( ) ../Bootstrap.php:184 5 TYPO3\CMS\Extbase\Mvc\Web\BackendRequestHandler->handleRequest( ) ../Bootstrap.php:195 6 TYPO3\CMS\Extbase\Mvc\Dispatcher->dispatch( ) ../BackendRequestHandler.php:33 7 TYPO3\CMS\Extbase\Mvc\Controller\ActionController->processRequest( ) ../Dispatcher.php:69 8 TYPO3\CMS\Extbase\Mvc\Controller\ActionController->callActionMethod( ) ../ActionController.php:157 9 call_user_func_array:{/typo3/typo3_src/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:286} ( ) ../ActionController.php:286 10 TYPO3\CMS\Extensionmanager\Controller\ActionController->toggleExtensionInstallationStateAction( ) ../ActionController.php:286 11 TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService->installExtension( ) ../ActionController.php:64 12 TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService->installDependencies( ) ../ExtensionManagementService.php:158 13 TYPO3\CMS\Extensionmanager\Utility\InstallUtility->install( ) ../ExtensionManagementService.php:254 14 TYPO3\CMS\Extensionmanager\Utility\InstallUtility->processDatabaseUpdates( ) ../InstallUtility.php:113 15 TYPO3\CMS\Extensionmanager\Utility\InstallUtility->importT3DFile( ) ../InstallUtility.php:235 16 TYPO3\CMS\Impexp\Utility\ImportExportUtility->importT3DFile( ) ../InstallUtility.php:472 17 TYPO3\CMS\Impexp\ImportExport->importData( ) ../ImportExportUtility.php:52 18 TYPO3\CMS\Impexp\ImportExport->writeRecords_pages( ) ../ImportExport.php:1445 19 TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap( ) ../ImportExport.php:1802 20 TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj( ) ../DataHandler.php:929 21 TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( ) ../GeneralUtility.php:4366 22 TYPO3\CMS\Core\Utility\GeneralUtility::instantiateClass( ) ../GeneralUtility.php:4414 23 tx_realurl_tcemain->__construct( ) ../GeneralUtility.php:4432
Realurl has an ext_autoload.php, but the data within the file is not available until AFTER the installation process has completly finished.
This error also appeared, after set both extensions to clearCacheOnLoad.
The bug might be related to #65785