[BUGFIX] Repopulate localconfig before cache reload in ext mgr 45/55045/4
authorSusanne Moog <susanne.moog@typo3.com>
Tue, 12 Dec 2017 12:09:30 +0000 (13:09 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 12 Dec 2017 12:33:26 +0000 (13:33 +0100)
Reloading caches requires the ext_localconf files. If in an
ext_localconf the extension configuration is accessed this
will fail directly after installation as the configuration is
not reloaded yet.

The patch changes the order to first write the new configuration,
then read the new configuration into the global array and
finally reloading the caches.

Change-Id: I9e2cd70078b2038aa30f2b4706aec46243ab2a9d
Resolves: #83300
Related: #82368
Releases: master
Reviewed-on: https://review.typo3.org/55045
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php

index f335ec3..2e173f4 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Extensionmanager\Utility;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
@@ -161,6 +162,8 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface
         } else {
             $this->cacheManager->flushCachesInGroup('system');
         }
+        $this->saveDefaultConfiguration($extensionKey);
+        Bootstrap::getInstance()->populateLocalConfiguration();
         $this->reloadCaches();
         $this->processExtensionSetup($extensionKey);
 
@@ -177,7 +180,6 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface
         $this->importInitialFiles($extension['siteRelPath'], $extensionKey);
         $this->processDatabaseUpdates($extension);
         $this->processRuntimeDatabaseUpdates($extensionKey);
-        $this->saveDefaultConfiguration($extensionKey);
     }
 
     /**