reverted: --- b/core/includes/config.inc +++ a/core/includes/config.inc @@ -41,10 +41,8 @@ * @see \Drupal\Core\Config\ConfigInstaller */ function config_install_default_config($type, $name) { + // Get all default configuration owned by this extension. + $source_storage = new ExtensionInstallStorage(); - // Get all default configuration owned by this extension. During installation - // this should include config from the installation profile. During normal - // runtime the installation profile should be ignored. - $source_storage = new ExtensionInstallStorage(drupal_get_profile(), drupal_installation_attempted()); $config_to_install = $source_storage->listAll($name . '.'); // Work out if this extension provides default configuration for any other diff -u b/core/includes/update.inc b/core/includes/update.inc --- b/core/includes/update.inc +++ b/core/includes/update.inc @@ -374,7 +374,7 @@ } if ($record->type == 'module') { - if (isset($module_data[$record->name])) { + if ($record->status && isset($module_data[$record->name])) { $module_config->set('enabled.' . $record->name, $record->weight); } } reverted: --- b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php +++ a/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php @@ -16,36 +16,6 @@ class ExtensionInstallStorage extends InstallStorage { /** - * Include profile config directories - *. - * @var bool - */ - protected $includeProfile; - - /** - * The installation profile. - * - * @var string - */ - protected $profile; - - /** - * Constructs a new FileStorage controller. - * - * @param string $profile - * The name of the installation profile used on the site. - * @param bool $include_profile - * If TRUE, include default configuration from the installation profile's - * config directory. - * - * Overrides Drupal\Core\Config\FileStorage::__construct(). - */ - public function __construct($profile, $include_profile = FALSE) { - $this->includeProfile = $include_profile; - $this->profile = $profile; - } - - /** * Returns a map of all config object names and their folders. * * The list is based on enabled modules and themes. @@ -55,13 +25,7 @@ */ protected function getAllFolders() { if (!isset($this->folders)) { + $this->folders = $this->getComponentNames('module', array_keys(\Drupal::moduleHandler()->getModuleList())); - $module_list = \Drupal::moduleHandler()->getModuleList(); - // Only include the profile module's config if $this->includeProfile is - // set to TRUE. - if (!$this->includeProfile && isset($module_list[$this->profile])) { - unset($module_list[$this->profile]); - } - $this->folders = $this->getComponentNames('module', array_keys($module_list)); $this->folders += $this->getComponentNames('theme', array_keys(array_filter(list_themes(), function ($theme) {return $theme->status;}))); } return $this->folders; diff -u b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ModulesDisabledUpgradePathTest.php @@ -35,24 +35,20 @@ */ public function testDisabledUpgrade() { - $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); - - // Get enabled modules. - $enabled = \Drupal::moduleHandler()->getModuleList(); - // Get all available modules. - $available = system_rebuild_module_data(); - // Filter out hidden test modules. - foreach ($available as $module => $data) { - if (!empty($data->info['hidden'])) { - unset($available[$module]); - } + $modules = db_query('SELECT name, info FROM {system} WHERE type = :module AND status = 0 AND schema_version <> :schema_uninstalled', array( + ':module' => 'module', + ':schema_uninstalled' => SCHEMA_UNINSTALLED, + ))->fetchAllKeyed(0, 1); + array_walk($modules, function (&$value, $key) { + $info = unserialize($value); + $value = $info['name']; + }); + // Load the first update screen. + $this->getUpdatePhp(); + if (!$this->assertResponse(200)) { + throw new \Exception('Initial GET to update.php did not return HTTP 200 status.'); } - $to_enable = array_diff_key($available, $enabled); - \Drupal::moduleHandler()->install(array_keys($to_enable)); - // Check for updates. - require_once DRUPAL_ROOT . '/core/includes/update.inc'; - require_once DRUPAL_ROOT . '/core/includes/install.inc'; - $updates = update_get_update_list(); - $this->assertEqual($updates, array(), 'No pending updates after enabling all modules.'); - $this->assertTrue(\Drupal::state()->get('update_test_1_update_dependencies_run'), 'Module update dependencies resolved for disabled modules'); + $this->assertNoFieldByXPath('//input[@type="submit"]', NULL, 'No continue button found on update.php.'); + $this->assertText('Drupal 8 no longer supports disabled modules. Please either enable or uninstall them before upgrading.'); + $this->assertText(implode(', ', $modules)); } } diff -u b/core/modules/system/system.install b/core/modules/system/system.install --- b/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -513,6 +513,25 @@ $requirements['update status']['title'] = t('Update notifications'); } + // Ensure that if upgrading from 7 to 8 we have no disabled modules. + if ($phase == 'update' && db_table_exists('system')) { + $modules = db_query('SELECT name, info FROM {system} WHERE type = :module AND status = 0 AND schema_version <> :schema_uninstalled', array( + ':module' => 'module', + ':schema_uninstalled' => SCHEMA_UNINSTALLED, + ))->fetchAllKeyed(0, 1); + array_walk($modules, function (&$value, $key) { + $info = unserialize($value); + $value = $info['name']; + }); + if (!empty($modules)) { + $requirements['disabled_modules'] = array( + 'severity' => REQUIREMENT_ERROR, + 'title' => t('Disabled modules'), + 'value' => format_plural(count($modules), 'The %modules module is disabled.', 'The following modules are disabled: %modules', array('%modules' => implode(', ', $modules))), + 'description' => t('Drupal 8 no longer supports disabled modules. Please either enable or uninstall them before upgrading.'), + ); + } + } return $requirements; }