MenuLinkParent fails if a parent menu item was not migrated

Created on 11 February 2025, 11 days ago

Problem/Motivation

If you are running a custom migration and are rehoming some menu items to a new parent, the migration fails with the error "parent: No parent link found for plid '9298' in menu 'main'."

Steps to reproduce

Use the following in a menu links migration:

  # Point some of the child menu items to the parent, to remove one layer from
  # the menu hierarchy.
  _plid:
    -
      source: plid
      plugin: static_map
      map:
        123: 321 # About
      bypass: true
  parent:
    -
      plugin: menu_link_parent
      source:
        - '@_plid'
        - '@menu_name'
        - parent_link_path

Proposed resolution

Run an extra check in MenuLinkParent to see if the requested parent ID exists in the menu system.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.1 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024