diff --git a/core/modules/migrate_drupal_ui/css/components/upgrade-analysis-report-tables.css b/core/modules/migrate_drupal_ui/css/components/upgrade-analysis-report-tables.css index f15ff6a4b4..1de1a1ebed 100644 --- a/core/modules/migrate_drupal_ui/css/components/upgrade-analysis-report-tables.css +++ b/core/modules/migrate_drupal_ui/css/components/upgrade-analysis-report-tables.css @@ -18,3 +18,6 @@ .upgrade-analysis-report__status-icon--checked:before { background-image: url(../../../../misc/icons/73b355/check.svg); } +.upgrade-analysis-report__status-icon--error:before { + background-image: url(../../../../misc/icons/e32700/error.svg); +} diff --git a/core/modules/migrate_drupal_ui/migrate_drupal_ui.module b/core/modules/migrate_drupal_ui/migrate_drupal_ui.module index 5f06cdcc87..1b36baf2da 100644 --- a/core/modules/migrate_drupal_ui/migrate_drupal_ui.module +++ b/core/modules/migrate_drupal_ui/migrate_drupal_ui.module @@ -26,7 +26,7 @@ function migrate_drupal_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('On the Upgrade page, you are guided through performing the upgrade in several steps.', [':upgrade' => \Drupal::url('migrate_drupal_ui.upgrade')]) . '
'; $output .= '
  1. ' . t('You need to enter the database credentials of the Drupal site that you want to upgrade. You can also include its files directory in the upgrade.') . '
  2. '; - $output .= '
  3. ' . t('The next page then provides an overview of which upgrade paths are available or missing, before you proceed to perform the upgrade.') . '
  4. '; + $output .= '
  5. ' . t('The next page then provides an overview of the modules that will be upgraded and those that will not be upgraded, before you proceed to perform the upgrade.') . '
  6. '; $output .= '
  7. ' . t('Lastly, a message is displayed about the number of upgrade tasks that were successful or failed.') . '
'; $output .= '
' . t('Reviewing the upgrade log') . '
'; $output .= '
' . t('You can review a log of upgrade messages by clicking the link in the message provided after the upgrade or by filtering the messages for the type migrate_drupal_ui on the Recent log messages page.', diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index 04da0f588c..edaff20f0e 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -27,6 +27,13 @@ class MigrateUpgradeForm extends ConfirmFormBase { use MigrationConfigurationTrait; /** + * The current form step. + * + * @var string + */ + protected $step; + + /** * The state service. * * @var \Drupal\Core\State\StateInterface @@ -214,8 +221,8 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { - $step = $form_state->get('step') ?: 'overview'; - switch ($step) { + $this->step = $form_state->get('step') ?: 'overview'; + switch ($this->step) { case 'overview': return $this->buildOverviewForm($form, $form_state); @@ -229,7 +236,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { return $this->buildConfirmForm($form, $form_state); default: - drupal_set_message($this->t('Unrecognized form step @step', ['@step' => $step]), 'error'); + drupal_set_message($this->t('Unrecognized form step @step', ['@step' => $this->step]), 'error'); return []; } } @@ -798,17 +805,17 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { '#title' => [ '#type' => 'html_tag', '#tag' => 'span', - '#value' => $this->t('Missing upgrade paths'), - '#attributes' => ['id' => ['warning']], + '#value' => $this->t('Modules that will not be upgraded'), + '#attributes' => ['id' => ['error']], ], - '#description' => $this->t('The following items will not be upgraded. For more information see Upgrading from Drupal 6 or 7 to Drupal 8.', [':migrate' => 'https://www.drupal.org/upgrade/migrate']), + '#description' => $this->t('There are no modules installed on your new site to replace these modules. If you proceed with the upgrade now, configuration and/or content needed by these modules will not be available on your new site. For more information, see Review the pre-upgrade analysis in the Upgrading to Drupal 8 handbook.', [':review' => 'https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser#pre-upgrade-analysis', ':migrate' => 'https://www.drupal.org/docs/8/upgrade']), '#weight' => 2, ]; $missing_module_list['module_list'] = [ '#type' => 'table', '#header' => [ - $this->t('Source module: Drupal @version', ['@version' => $version]), - $this->t('Upgrade module: Drupal 8'), + $this->t('Drupal @version', ['@version' => $version]), + $this->t('Drupal 8'), ], ]; $missing_count = 0; @@ -824,21 +831,22 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { '#attributes' => [ 'class' => [ 'upgrade-analysis-report__status-icon', - 'upgrade-analysis-report__status-icon--warning', + 'upgrade-analysis-report__status-icon--error', ], ], ], - 'destination_module' => ['#plain_text' => 'Missing'], + 'destination_module' => ['#plain_text' => 'Not upgraded'], ]; } } + // Available migrations. $available_module_list = [ '#type' => 'details', '#title' => [ '#type' => 'html_tag', '#tag' => 'span', - '#value' => $this->t('Available upgrade paths'), + '#value' => $this->t('Modules that will be upgraded'), '#attributes' => ['id' => ['checked']], ], '#weight' => 3, @@ -847,8 +855,8 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { $available_module_list['module_list'] = [ '#type' => 'table', '#header' => [ - $this->t('Source module: Drupal @version', ['@version' => $version]), - $this->t('Upgrade module: Drupal 8'), + $this->t('Drupal @version', ['@version' => $version]), + $this->t('Drupal 8'), ], ]; @@ -885,8 +893,8 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { $counters[] = [ '#theme' => 'status_report_counter', '#amount' => $missing_count, - '#text' => $this->formatPlural($missing_count, 'Missing upgrade path', 'Missing upgrade paths'), - '#severity' => 'warning', + '#text' => $this->formatPlural($missing_count, 'Module will not be upgraded', 'Modules will not be upgraded'), + '#severity' => 'error', '#weight' => 0, ]; $general_info[] = $missing_module_list; @@ -895,7 +903,7 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { $counters[] = [ '#theme' => 'status_report_counter', '#amount' => $available_count, - '#text' => $this->formatPlural($available_count, 'Available upgrade path', 'Available upgrade paths'), + '#text' => $this->formatPlural($available_count, 'Module will be upgraded', 'Modules will be upgraded'), '#severity' => 'checked', '#weight' => 1, ]; @@ -960,7 +968,12 @@ protected function getDatabaseTypes() { * {@inheritdoc} */ public function getQuestion() { - return $this->t('Upgrade analysis report'); + if ($this->step === 'confirm_id_conflicts') { + return $this->t('Upgrade analysis report'); + } + else { + return $this->t('What will be upgraded?'); + } } /**