diff --git a/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php b/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php index 5716790cd7dd15e463238f4278d18ccd25ac5106..46a4d3f9ee4837d1a9ae954dff06f52d39275705 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php +++ b/core/modules/migrate/src/Plugin/migrate/process/MenuLinkParent.php @@ -150,6 +150,13 @@ public function transform($value, MigrateExecutableInterface $migrate_executable return $link->getPluginId(); } + // Check if the parent menu item is already in the system, i.e. it was + // manually created e.g. using default content. + $link = $this->menuLinkStorage->load($parent_id); + if (!empty($link)) { + return $link->getPluginId(); + } + // Parent could not be determined by ID, so we try to determine by the // combination of the menu name and parent link path. if (isset($value[1])) {