diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index e4ccdfb9b5..fd60136c53 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -21,7 +21,6 @@ use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; - /** * Provides module installation interface. * diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 4cf4dba37b..678ea6bb17 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -294,13 +294,7 @@ function template_preprocess_system_themes_page(&$variables) { // Make sure to provide feedback on compatibility. $current_theme['incompatible'] = ''; if (!empty($theme->incompatible_core)) { - if (isset($theme->info['core'])) { - $current_theme['incompatible'] = t("This theme is not compatible with Drupal @core_version. It is only compatible with Drupal versions that satisfy this constraint: @core_constraint", ['@core_version' => \Drupal::VERSION, '@core_constraint' => $theme->info['core']]); - } - else { - $current_theme['incompatible'] = t("This theme must declare a 'core' value in its .info.yml file."); - } - + $current_theme['incompatible'] = t("This theme is not compatible with Drupal @core_version. Check that the .info.yml file contains a compatible 'core' value.", ['@core_version' => \Drupal::VERSION, '@core_constraint' => $theme->info['core']]); } elseif (!empty($theme->incompatible_region)) { $current_theme['incompatible'] = t("This theme is missing a 'content' region."); diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php index a107459ff6..02952f6656 100644 --- a/core/modules/system/tests/src/Functional/System/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php @@ -368,7 +368,7 @@ public function testInvalidTheme() { $this->assertText(t('This theme requires the base theme @base_theme to operate correctly.', ['@base_theme' => 'test_invalid_basetheme'])); $this->assertText(t('This theme requires the theme engine @theme_engine to operate correctly.', ['@theme_engine' => 'not_real_engine'])); // Check for the error text of a theme with the wrong core version. - $this->assertText("This theme is not compatible with Drupal 8.x. Check that the .info.yml file contains the correct 'core' value."); + $this->assertText("This theme is not compatible with Drupal " . \Drupal::VERSION . ". Check that the .info.yml file contains a compatible 'core' value."); // Check for the error text of a theme without a content region. $this->assertText("This theme is missing a 'content' region."); }