diff --git a/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php b/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php index 1e7427c..ffe652a 100644 --- a/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php +++ b/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php @@ -2,7 +2,6 @@ namespace Drupal\path\Plugin\migrate\destination; -use Drupal\node\Entity\Node; use Drupal\Core\Path\AliasStorage; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; @@ -65,8 +64,8 @@ public function import(Row $row, array $old_destination_id_values = array()) { $langcode = $row->getDestinationProperty('langcode'); $pid = $old_destination_id_values ? $old_destination_id_values[0] : NULL; - if (preg_match('/^\/node\/(\d+)$/', $source, $matches)) { - if (Node::load($matches[1]) === NULL) { + if (preg_match('/^\/node\/(\d+)$/', $source)) { + if ($row->hasDestinationProperty('node_translation')) { $node_translation = $row->getDestinationProperty('node_translation'); $source = '/node/' . $node_translation[0]; $langcode = $node_translation[1];