diff -u b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php --- b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php +++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php @@ -407,47 +407,29 @@ foreach ($migrations as $migration) { $migration_id = $migration->getPluginId(); - // Determine the source provider. - $source_plugin_provider = (!empty($migration->getSourcePlugin() - ->getPluginDefinition()['source_provider'])) ? $migration->getSourcePlugin() - ->getPluginDefinition()['source_provider'] : NULL; - // Provider in the configuration. - $source_provider = (!empty($migration->getSourceConfiguration()['provider'])) ? $migration->getSourceConfiguration()['provider'] : NULL; - - $source_module = ''; - if ($source_plugin_provider && !$source_provider) { - $source_module = $source_plugin_provider; - } - if (!$source_plugin_provider && $source_provider) { - $source_module = $source_provider; + // Determine the source provider, looking at configuration first. + $source_module = (!empty($migration->getSourceConfiguration()['provider'])) ? $migration->getSourceConfiguration()['provider'] : NULL; + if (!$source_module) { + $source_module = (!empty($migration->getSourcePlugin() + ->getPluginDefinition()['source_provider'])) ? $migration->getSourcePlugin() + ->getPluginDefinition()['source_provider'] : NULL; } if (!$source_module) { - if ($source_plugin_provider && $source_provider) { - drupal_set_message(t('Source provider exists in source plugin and migration @migration_id.', ['@migration_id' => $migration_id]), 'error'); - - } - else { - drupal_set_message(t('Source provider not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); - } + drupal_set_message(t('Source provider not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); } // Determine the destination provider. - $destination_module = ''; - $destination_provider = (!empty($migration->getDestinationConfiguration()['provider'])) ? $migration->getDestinationConfiguration()['provider'] : NULL; - if ($destination_provider) { - // Source plugin provider and destination provider. - $destination_module = $destination_provider; - } - else { + $destination_module = (!empty($migration->getDestinationConfiguration()['provider'])) ? $migration->getDestinationConfiguration()['provider'] : NULL; + if (!$destination_module) { if ($migration->getDestinationPlugin()->getPluginId() == 'config') { $configuration_destination = (!empty($migration->getDestinationConfiguration()['config_name'])) ? $migration->getDestinationConfiguration()['config_name'] : NULL; if ($configuration_destination) { $destination_module = explode('.', $configuration_destination, 2)[0]; } } - else { - drupal_set_message(t('Destination provider not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); - } + } + if (!$destination_module) { + drupal_set_message(t('Destination provider not found for @migration_id.', ['@migration_id' => $migration_id]), 'error'); } if ($source_module && $destination_module) {