Skip to content
Snippets Groups Projects

Issue #3306283: Display readiness check results if any after installing Automatic Updates

2 files
+ 9
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -14,6 +14,7 @@ use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\Core\Url;
use Drupal\package_manager\ValidationResult;
use Drupal\system\SystemManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -194,9 +195,12 @@ final class AdminStatusCheckMessages implements ContainerInjectionInterface {
*/
public function displayResultSummary() {
if ($this->currentUser->hasPermission('administer site configuration')) {
$results = $this->statusChecker->getResults();
$overall_severity = ValidationResult::getOverallSeverity($results);
if (!empty($this->statusChecker->getResults())) {
$message = $this->getFailureMessageForSeverity($overall_severity);
$checker_url = Url::fromRoute('system.status');
$this->messenger()->addError($this->t('<a href=":url">See status reports for more details.</a>', [
$this->messenger()->addError($this->t($message . ' ' . '<a href=":url">See status reports for more details.</a>', [
':url' => $checker_url->toString(),
]));
}
Loading