diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php index 59f28a63bb..198f9f138e 100644 --- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -177,6 +177,8 @@ class MigrateUpgradeForm extends ConfirmFormBase { 'trigger', 'views_content', 'views_ui', + 'minimal', + 'standard', ], ]; @@ -812,11 +814,27 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { // Fetch the system data at the first opportunity. $system_data = $form_state->get('system_data'); - // Add source_module and destination_module for modules that do not need an - // upgrade path and are enabled on the source site. + // Get the available profiles. + $profile_list = []; + foreach (system_get_info('module') as $name => $info) { + if ($info['type'] === 'profile' && dirname(drupal_get_path('profile', $name)) === 'core/profiles') { + $profile_list[] = $name; + } + } + + // Add source_module and destination_module for extensions that do not need + // an upgrade path and are enabled on the source site. foreach ($this->noUpgradePaths[$version] as $extension) { - if ($system_data['module'][$extension]['status']) { - $table_data[$extension]['core'][$extension] = $extension; + if (isset($system_data['module'][$extension])) { + // If this is a profile remove it from the system data + if (in_array($extension, $profile_list)) { + unset($system_data['module'][$extension]); + } + else { + if ($system_data['module'][$extension]['status']) { + $table_data[$extension]['core'][$extension] = $extension; + } + } } } @@ -827,11 +845,6 @@ public function buildConfirmForm(array $form, FormStateInterface $form_state) { ksort($table_data[$source_module]); } - // Remove core profiles from the system data. - foreach (['standard', 'minimal'] as $profile) { - unset($system_data['module'][$profile]); - } - $unmigrated_source_modules = array_diff_key($system_data['module'], $table_data); // Missing migrations. diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php index 23d5c295f3..a06aaa93c6 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php @@ -130,6 +130,19 @@ protected function translatePostValues(array $values) { * An array of modules that will not be upgraded. */ protected function assertUpgradePaths(WebAssert $session, array $available_paths, array $missing_paths) { + // Ensure that all available/missing are modules and not install profiles. + $system_info = system_get_info('module'); + foreach ($available_paths as $available) { + if (isset($system_info[$available])) { + $this->assertEquals('module', $system_info[$available]['type']); + } + } + foreach ($missing_paths as $missing) { + if (isset($system_info[$missing])) { + $this->assertEquals('module', $system_info[$missing]['type']); + } + } + // Test the available migration paths. foreach ($available_paths as $available) { $session->elementExists('xpath', "//span[contains(@class, 'checked') and text() = '$available']");