diff -u b/core/includes/install.core.inc b/core/includes/install.core.inc --- b/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -677,8 +677,12 @@ // @todo Replace this when we refactor the installer to use a request- // response workflow. if ($output instanceof Response) { + if (\Drupal::request()->hasSession()) { + \Drupal::request()->getSession()->save(); + } + // Send the response. $output->send(); - $output = NULL; + exit; } // The task is complete when we try to access the batch page and receive // FALSE in return, since this means we are at a URL where we are no @@ -1547,8 +1551,6 @@ $session = \Drupal::service('session'); \Drupal::request()->setSession($session); $session->start(); - // Ensure the session is maintained throughout the install. - $session->set('_drupal_installing', TRUE); } /** @@ -1846,9 +1848,6 @@ // Installation profiles are always loaded last. module_set_weight($profile, 1000); - // Clean up the session flag. - \Drupal::service('session')->remove('_drupal_installing'); - // Build the router once after installing all modules. // This would normally happen upon KernelEvents::TERMINATE, but since the // installer does not use an HttpKernel, that event is never triggered.