diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 4aed1ef..000f3dd 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -475,6 +475,7 @@ function update_mail($key, &$message, $params) { */ function _update_message_text($msg_type, $msg_reason, $report_link = FALSE, $langcode = NULL) { $text = ''; + $skip_update_manager = FALSE; switch ($msg_reason) { case UPDATE_NOT_SECURE: if ($msg_type == 'core') { @@ -517,11 +518,14 @@ function _update_message_text($msg_type, $msg_reason, $report_link = FALSE, $lan case UPDATE_NOT_FETCHED: case UPDATE_FETCH_PENDING: if ($msg_type == 'core') { - $text = t('There was a problem checking available updates for Drupal.', array('@update-report' => \Drupal::url('update.status')), array('langcode' => $langcode)); + $text = t('There was a problem checking updates for Drupal.', array(), array('langcode' => $langcode)); } else { - $text = t('There was a problem checking available updates for your modules or themes.', array('@update-report' => \Drupal::url('update.status')), array('langcode' => $langcode)); + $text = t('There was a problem checking updates for your modules or themes.', array(), array('langcode' => $langcode)); } + // If there was a problem checking updates, linking to the update manager + // doesn't make sense since there is nothing to update. + $skip_update_manager = TRUE; break; } if (!empty($langcode)) { @@ -531,7 +535,7 @@ function _update_message_text($msg_type, $msg_reason, $report_link = FALSE, $lan $language = NULL; } if ($report_link) { - if (update_manager_access()) { + if (!$skip_update_manager && update_manager_access()) { $text .= ' ' . t('See the available updates page for more information and to install your missing updates.', array('@available_updates' => \Drupal::url('update.report_update', [], ['language' => $language])), array('langcode' => $langcode)); } else {