Commit 00d05d03 authored by Simon Gilli's avatar Simon Gilli Committed by Benjamin Franzke
Browse files

[BUGFIX] Load all backend routes in installer controller

The routes added via ExtensionManagementUtility::addModule() are missing
when the UriBuilder/Router is used prior to ext_localconf loading.

Also for this particular case, multiple instances of the Router class
were created, as UriBuilder is loaded from the failsafe installtool
container instead of using an instance from the symfony container
(as created by LateBootService n loadExtLocalconfDatabaseAndExtTables).
This resulted in multiple routers being loaded with different sets of
routes.

This patch ensures that the routes are loaded from a UriBuilder/Router
instance that is fully populated with information from ext_localconf.
Therefore GeneralUtility::makeInstance() is avoided and
UriBuilder is fetched from the late booted container instead.

Resolves: #95806
Releases: main, 11.5
Change-Id: Id57bf09fb7798eac26dbdbc6ed89228c54fbafb9
parent d15b46b9
Pipeline #20446 passed with stages
in 13 minutes and 27 seconds
...@@ -1013,7 +1013,8 @@ class InstallerController ...@@ -1013,7 +1013,8 @@ class InstallerController
$configurationValues = $featureManager->getBestMatchingConfigurationForAllFeatures(); $configurationValues = $featureManager->getBestMatchingConfigurationForAllFeatures();
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); $container = $this->lateBootService->loadExtLocalconfDatabaseAndExtTables();
$uriBuilder = $container->get(UriBuilder::class);
$nextStepUrl = $uriBuilder->buildUriFromRoute('login'); $nextStepUrl = $uriBuilder->buildUriFromRoute('login');
// Let the admin user redirect to the distributions page on first login // Let the admin user redirect to the distributions page on first login
switch ($request->getParsedBody()['install']['values']['sitesetup']) { switch ($request->getParsedBody()['install']['values']['sitesetup']) {
...@@ -1099,7 +1100,6 @@ For each website you need a TypoScript template on the main page of your website ...@@ -1099,7 +1100,6 @@ For each website you need a TypoScript template on the main page of your website
} }
// Mark upgrade wizards as done // Mark upgrade wizards as done
$this->lateBootService->loadExtLocalconfDatabaseAndExtTables();
if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) { if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $updateClassName) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $updateClassName) {
if (!in_array(RepeatableInterface::class, class_implements($updateClassName) ?: [], true)) { if (!in_array(RepeatableInterface::class, class_implements($updateClassName) ?: [], true)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment