Issue Bug Closed

#104661Install tool: TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$packageManager must not be accessed before initialization

Christian Weiske 08/19/24, 07:26 updated 09/18/24, 06:18

Description

I tried to install a fresh composer-based 12.4.19 TYPO3 installation and when accessing the install tool at /typo3/install/ I get errors in the PHP 8.3 error log:

PHP message: PHP Fatal error:  Uncaught Error:
 Typed static property TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$packageManager must not be accessed before initialization
 in /var/www/typo3/vendor/typo3/cms-core/Classes/Utility/ExtensionManagementUtility.php:111
Stack trace:
#0 /var/www/typo3/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php(2613): TYPO3\CMS\Core\Utility\ExtensionManagementUtility::resolvePackagePath()
#1 /var/www/typo3/vendor/typo3/cms-core/Classes/Controller/ErrorPageController.php(46): TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName()
#2 /var/www/typo3/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php(2985): TYPO3\CMS\Core\Controller\ErrorPageController->__construct()
#3 /var/www/typo3/vendor/typo3/cms-core/Classes/Error/ProductionExceptionHandler.php(63): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()
#4 /var/www/typo3/vendor/typo3/cms-core/Classes/Error/AbstractExceptionHandler.php(77): TYPO3\CMS\Core\Error\ProductionExceptionHandler->echoExcepti...

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 8

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2024-08-19T16:49:01+00:00" > 08/19/24, 16:49 </span>

    How does your composer.json look like exactly? Maybe some extension like tt_address included, or pure vanilla without any custom or 3rd party extensions?

    Which composer version?

    Is it completely fresh on a path were no installation was before (thinking about opcache)?

  2. Cari Nthia commented and changed TYPO3 Version 12 13 <span data-processor="relativetime" data-value="2024-09-15T22:05:55+00:00" > 09/15/24, 22:05 </span>

    Garvin Hicking wrote in #note-1:
    > How does your composer.json look like exactly? Maybe some extension like tt_address included, or pure vanilla without any custom or 3rd party extensions?
    >
    > Which composer version?
    >
    > Is it completely fresh on a path were no installation was before (thinking about opcache)?

    I have the same issue. TYPO3 Version 13. Clean install on Windows Server 2022 with IIS and PHP Version 8.2.23. No composer installation.

    PHP Fatal error:  Uncaught Error: Typed static property TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$packageManager must not be accessed before initialization in C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Utility\ExtensionManagementUtility.php:72
    Stack trace:
    #0 C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Utility\GeneralUtility.php(2438): TYPO3\CMS\Core\Utility\ExtensionManagementUtility::resolvePackagePath('EXT:core/Resour...')
    #1 C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Controller\ErrorPageController.php(47): TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:core/Resour...')
    #2 C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Utility\GeneralUtility.php(2809): TYPO3\CMS\Core\Controller\ErrorPageController->__construct()
    #3 C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Error\ProductionExceptionHandler.php(63): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\...')
    #4 C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Error\AbstractExceptionHandler.php(79): TYPO3\CMS\Core\Error\ProductionExceptionHandler->echoExceptionWeb(Object(Symfony\Component\Finder\Exception\DirectoryNotFoundException))
    #5 [internal function]: TYPO3\CMS\Core\Error\AbstractExceptionHandler->handleException(Object(Symfony\Component\Finder\Exception\DirectoryNotFoundException))
    #6 {main}
      thrown in C:\inetpub\typo3_src-13.2.1\typo3\sysext\core\Classes\Utility\ExtensionManagementUtility.php on line 72
  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-16T06:37:59+00:00" > 09/16/24, 06:37 </span>

    Could it be because you access /typo3/installl/ instead of /typo3/install.php? The entrypoint moved some time ago.

  4. Cari Nthia commented <span data-processor="relativetime" data-value="2024-09-16T06:40:28+00:00" > 09/16/24, 06:40 </span>

    Garvin Hicking wrote in #note-4:
    > Could it be because you access /typo3/installl/ instead of /typo3/install.php? The entrypoint moved some time ago.

    Hello,

    well, the install tool works great. I get this error when I try to access the TYPO3 Backend at /typo3/

  5. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-16T07:32:03+00:00" > 09/16/24, 07:32 </span>

    @cari_nthia Om – you have the same error message but your problem seems different.

    Please describe more about your setup.

    The installation went fine? You never could access the backend after install? You can still access the install tool? Did the settings file get created? Are all needed directories created, like var, typo3conf and so on? Did you place the proper htaccess-like settings? For IIS you need to do that manually because htaccess does not work there. It is needed for routing.

    The error above is an error that can happen if the routing to access backend files fails.

  6. Cari Nthia commented <span data-processor="relativetime" data-value="2024-09-16T07:36:56+00:00" > 09/16/24, 07:36 </span>

    Garvin Hicking wrote in #note-6:
    > @cari_nthia Om – you have the same error message but your problem seems different.
    >
    > Please describe more about your setup.
    >
    > The installation went fine? You never could access the backend after install? You can still access the install tool? Did the settings file get created? Are all needed directories created, like var, typo3conf and so on? Did you place the proper htaccess-like settings? For IIS you need to do that manually because htaccess does not work there. It is needed for routing.
    >
    > The error above is an error that can happen if the routing to access backend files fails.

    Exactly, the installation went fine and after that I never could access the backend after install. Now I opened the install process again and it took me right to step 5. After clicking on “Take me to the backend” it worked. :-) Thank you.

    The problem was, that for TYPO3 the backend is not reachable under /typo3/ (I get the mentioned errors) but under /typo3/login it is reachable without errors.

  7. Garvin Hicking commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2024-09-18T06:18:08+00:00" > 09/18/24, 06:18 </span>

    Thanks for the feedback. Closing it now because I would say accessing /install/ is not supposed to work anymore. I think the error can only happen when the installation already wrote a htaccess file or you have nging config in place that routes /install/ to the (non-installed!) backend endpoint.