diff -u b/core/includes/module.inc b/core/includes/module.inc --- b/core/includes/module.inc +++ b/core/includes/module.inc @@ -142,7 +142,6 @@ foreach ($enabled_modules as $module => $weight) { $filename = $module_data[$module]->filename; _system_list_warm('module', $module, $filename, TRUE); - drupal_classloader_register($module, dirname($filename)); foreach (bootstrap_hooks() as $hook) { if (function_exists($module .'_' . $hook)) { $bootstrap_list[$module] = $filename; diff -u b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php @@ -27,7 +27,7 @@ /** * The basic functionality of module_list(). */ - function xtestModuleList() { + function testModuleList() { // Build a list of modules, sorted alphabetically. $profile_info = install_profile_info('standard', 'en'); $module_list = $profile_info['dependencies']; @@ -85,7 +85,7 @@ /** * Test module_implements() caching. */ - function xtestModuleImplements() { + function testModuleImplements() { // Clear the cache. cache('bootstrap')->delete('module_implements'); $this->assertFalse(cache('bootstrap')->get('module_implements'), t('The module implements cache is empty.')); @@ -114,7 +114,7 @@ /** * Test that module_invoke() can load a hook defined in hook_hook_info(). */ - function xtestModuleInvoke() { + function testModuleInvoke() { module_enable(array('module_test'), FALSE); $this->resetAll(); $this->drupalGet('module-test/hook-dynamic-loading-invoke'); @@ -124,7 +124,7 @@ /** * Test that module_invoke_all() can load a hook defined in hook_hook_info(). */ - function xtestModuleInvokeAll() { + function testModuleInvokeAll() { module_enable(array('module_test'), FALSE); $this->resetAll(); $this->drupalGet('module-test/hook-dynamic-loading-invoke-all'); @@ -137,7 +137,7 @@ * We test this separately from testModuleInvokeAll(), because menu item load * functions execute early in the request handling. */ - function xtestModuleInvokeAllDuringLoadFunction() { + function testModuleInvokeAllDuringLoadFunction() { module_enable(array('module_test'), FALSE); $this->resetAll(); $this->drupalGet('module-test/hook-dynamic-loading-invoke-all-during-load/module_test'); @@ -164,7 +164,6 @@ $result = module_enable(array('forum')); $this->assertFalse($result, t('module_enable() returns FALSE if dependencies are missing.')); $this->assertFalse(module_exists('forum'), t('module_enable() aborts if dependencies are missing.')); - return; // Now, fix the missing dependency. Forum module depends on poll, but poll // depends on the PHP module. module_enable() should work. @@ -252,7 +251,7 @@ /** * Tests whether the correct module metadata is returned. */ - function xtestModuleMetaData() { + function testModuleMetaData() { // Generate the list of available modules. $modules = system_rebuild_module_data(); // Check that the mtime field exists for the system module. @@ -266,7 +265,7 @@ /** * Tests whether the correct theme metadata is returned. */ - function xtestThemeMetaData() { + function testThemeMetaData() { // Generate the list of available themes. $themes = system_rebuild_theme_data(); // Check that the mtime field exists for the bartik theme. diff -u b/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc --- b/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -792,8 +792,9 @@ // Remove hidden modules from display list. $visible_files = $files; + $profile = drupal_get_profile(); foreach ($visible_files as $filename => $file) { - if (!empty($file->info['hidden'])) { + if (!empty($file->info['hidden']) || $filename == $profile) { unset($visible_files[$filename]); } } diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2795,20 +2795,18 @@ $record->weight = 0; $record->status = 0; $record->schema_version = SCHEMA_UNINSTALLED; - // Copy parsed info. - $record->info = $record->parsed_info; } // Enabled status and weights. foreach (config('system.module')->get() as $module => $weight) { $modules[$module]->status = 1; $modules[$module]->weight = $weight; } - $modules = _module_build_dependencies($modules); // As noted above, system_list_reset() deletes $modules_cache so the order // here is important. system_list_reset(); $modules_cache['data'] = $modules; } + // Running the info alter function is not possible before full bootstrap. if (!isset($modules_cache['info_alter']) && drupal_get_bootstrap_phase() >= DRUPAL_BOOTSTRAP_CODE) { // Invoke hook_system_info_alter() to give installed modules a chance to // modify the data in the .info files if necessary. It is not possible to @@ -2817,6 +2815,10 @@ $type = 'module'; // It is not impossible a function resets the modules cache. Keep it. $modules = $modules_cache['data']; + foreach ($modules as $record) { + // Copy parsed info. + $record->info = $record->parsed_info; + } foreach (config('system.module')->get() as $module => $weight) { $function = $module .'_system_info_alter'; if (function_exists($function)) {