diff -u b/core/includes/common.inc b/core/includes/common.inc --- b/core/includes/common.inc +++ b/core/includes/common.inc @@ -6373,7 +6373,7 @@ PhpStorageFactory::get('twig')->deleteAll(); // Rebuild module and theme data. - $files = system_rebuild_module_data(); + $module_data = system_rebuild_module_data(); system_rebuild_theme_data(); // Ensure that all modules that are currently supposed to be enabled are @@ -6383,6 +6383,12 @@ // Rebuild and reboot a new kernel. // A simple DrupalKernel::reboot() is not sufficient, since the list of // enabled modules might have been adjusted above due to changed code. + $files = array(); + foreach ($module_data as $module => $data) { + if (isset($data->uri)) { + $files[$module] = $data->uri; + } + } drupal_container()->get('kernel')->updateModules(module_list(), $files); // Update the list of bootstrap modules.