diff --git a/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php b/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php index e8a075606e..617650ccf6 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php +++ b/core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php @@ -160,9 +160,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable $source_id_values = []; $migrations = $this->migrationPluginManager->createInstances($migration_ids); foreach ($migrations as $migration_id => $migration) { - if ($migration_id == $this->migration->id()) { - $self = TRUE; - } + if (isset($this->configuration['source_ids'][$migration_id])) { $configuration = ['source' => $this->configuration['source_ids'][$migration_id]]; $value = $this->processPluginManager @@ -184,13 +182,10 @@ public function transform($value, MigrateExecutableInterface $migrate_executable return NULL; } - if (!$destination_ids && ($self || isset($this->configuration['stub_id']) || count($migrations) == 1)) { + if (!$destination_ids) { // If the lookup didn't succeed, figure out which migration will do the // stubbing. - if ($self) { - $migration = $this->migration; - } - elseif (isset($this->configuration['stub_id'])) { + if (isset($this->configuration['stub_id'])) { $migration = $migrations[$this->configuration['stub_id']]; } else {