diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 8519961..63c22d0 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -494,6 +494,10 @@ function install_begin_request(&$install_state) { // Override the module list with a minimal set of modules. $module_handler->setModuleList(array('system' => 'core/modules/system/system.module')); } + // After setting up a custom and finite module list in a custom low-level + // bootstrap like here, ensure to use ModuleHandler::loadAll() so that + // ModuleHandler::isLoaded() returns TRUE, since that is a condition being + // checked by other subsystems (e.g., the theme system). $module_handler->loadAll(); // Add list of all available profiles to the installation state. diff --git a/core/includes/module.inc b/core/includes/module.inc index e7cad81..dce73de 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -290,8 +290,9 @@ function drupal_required_modules() { $files = $listing->scan('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules'); $required = array(); - // An installation profile is required and one must always be loaded. - // The only exception is the installer. + // Unless called by the installer, an installation profile is required and + // must always be loaded. drupal_get_profile() also returns the installation + // profile in the installer, but only after it has been selected. if ($profile = drupal_get_profile()) { $required[] = $profile; }