diff -u b/core/modules/menu_link_content/migration_templates/d6_menu_links_translation.yml b/core/modules/menu_link_content/migration_templates/d6_menu_links_translation.yml --- b/core/modules/menu_link_content/migration_templates/d6_menu_links_translation.yml +++ b/core/modules/menu_link_content/migration_templates/d6_menu_links_translation.yml @@ -7,6 +7,10 @@ process: id: mlid langcode: language + skip: + - plugin: skip_on_empty + method: row + source: migrate title: plugin: menu_link_translation source: diff -u b/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLinkTranslation.php b/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLinkTranslation.php --- b/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLinkTranslation.php +++ b/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLinkTranslation.php @@ -63,6 +63,11 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { + $language = $row->getSourceProperty('language'); + $mlid = $row->getSourceProperty('mlid'); + if (empty($this->idMap->lookupDestinationIds(['mlid' => $mlid, 'language' => $language]))) { + $row->setSourceProperty('migrate', TRUE); + } // Set untranslated values as defaults. $row->setSourceProperty('title_untranslated', $row->getSourceProperty('link_title')); $row->setSourceProperty('options', unserialize($row->getSourceProperty('options'))); @@ -73,8 +78,6 @@ $row->setSourceProperty($property . '_translated', $row->getSourceProperty('translation')); // Get the translation for the property not already in the row. - $language = $row->getSourceProperty('language'); - $mlid = $row->getSourceProperty('mlid'); $property2 = ($property == 'title') ? 'description' : 'title'; $query = $this->select('i18n_strings', 'i18n') ->fields('i18n', ['lid']);