Commit 999e16ad authored by catch's avatar catch
Browse files

Issue #3266449 by quietone, dww, smustgrave, murilohp: Add a link to the...

Issue #3266449 by quietone, dww, smustgrave, murilohp: Add a link to the Status report warning about obsolete extensions so site owners can fix the problem
parent 1d97f058
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -196,8 +196,9 @@ function system_requirements($phase) {
      }
      $requirements['obsolete_extensions'] = [
        'title' => t('Obsolete extensions enabled'),
        'value' => t('Obsolete extensions found: %extensions. Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.', [
        'value' => t('Obsolete extensions found: %extensions. Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately <a href=":uninstall_url">uninstall these extensions</a> since they may be removed in a future release.', [
          '%extensions' => Markup::create(implode(', ', $obsolete_extensions_link_list)),
          ':uninstall_url' => Url::fromRoute('system.modules_uninstall')->toString(),
        ]),
        'severity' => REQUIREMENT_WARNING,
      ];
+3 −0
Original line number Diff line number Diff line
@@ -141,12 +141,15 @@ public function testStatusPage() {
    $this->drupalGet('admin/reports/status');
    $session->pageTextContains('Obsolete extensions enabled');
    $session->pageTextContains('Obsolete extensions found: System obsolete status test.');
    $session->pageTextContains('Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.');
    $this->assertSession()->elementExists('xpath', "//a[contains(@href, '/admin/modules/uninstall')]");

    // Make sure the warning is gone after uninstalling the module.
    $module_installer->uninstall(['system_status_obsolete_test']);
    $this->drupalGet('admin/reports/status');
    $session->pageTextNotContains('Obsolete extensions enabled');
    $session->pageTextNotContains('Obsolete extensions found: System obsolete status test.');
    $session->pageTextNotContains('Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.');

    // Install deprecated theme and confirm warning message is displayed.
    $theme_installer = \Drupal::service('theme_installer');