diff --git a/src/Plugin/migrate/process/EntityLookup.php b/src/Plugin/migrate/process/EntityLookup.php index 940d029..4098718 100644 --- a/src/Plugin/migrate/process/EntityLookup.php +++ b/src/Plugin/migrate/process/EntityLookup.php @@ -90,8 +90,9 @@ public function __construct(array $configuration, $pluginId, $pluginDefinition, $this->migration = $migration; $this->entityManager = $entityManager; $this->selectionPluginManager = $selectionPluginManager; - $this->destinationEntityType = substr($this->migration->getDestinationPlugin()->getPluginId(), 7); - $this->destinationBundleKey = $this->entityManager->getDefinition($this->destinationEntityType)->getKey('bundle'); + $pluginIdParts = explode(':', $this->migration->getDestinationPlugin()->getPluginId()); + $this->destinationEntityType = empty($pluginIdParts[1]) ?: $pluginIdParts[1]; + $this->destinationBundleKey = !$this->destinationEntityType ?: $this->entityManager->getDefinition($this->destinationEntityType)->getKey('bundle'); } /**