- Issue created by @nicxvan
- πΊπΈUnited States nicxvan
Is this a duplicate of #2572285: Module enabling and router rebuilding should be done in one transaction β
- π¬π§United Kingdom catch
It's more of a revert of π Rebuild routes immediately when modules are installed Fixed .
See the comments in ModuleInstaller:
if (!\Drupal::service('router.route_provider.lazy_builder')->hasRebuilt()) { // Rebuild routes after installing module. This is done here on top of // \Drupal\Core\Routing\RouteBuilder::destruct to not run into errors on // fastCGI which executes ::destruct() after the module installation // page was sent already. \Drupal::service('router.builder')->rebuild(); } else { // Rebuild the router immediately if it is marked as needing a rebuild. // @todo Work this through a bit more. This fixes // \Drupal\Tests\standard\Functional\StandardTest::testStandard() // after separately out the optional configuration install. \Drupal::service('router.builder')->rebuildIfNeeded(); }