Add lookup_migrations configuration to menu_link_parent process plugin

Created on 11 January 2025, 11 days ago

Problem/Motivation

The menu_link_parent process plugin takes an array with three elements:

     plugin: menu_link_parent
     source:
       - plid
       - menu_name
       - parent_link_path

It first tries to look up plid, using the current migration. There is no way for the migration to specify a different migration, or additional ones.

If the migration lookup fails, the next step is to look up the link based on the menu name and link path.

Proposed resolution

Add the configuration option lookup_migrations so that the migration has control over the lookup process:

     plugin: menu_link_parent
     lookup_migrations:
       - this_migration
       - another_migration
     source:
       - plid
       - menu_name
       - parent_link_path

The migration can also specify lookup_migrations: [] in order to skip the migration lookup (ignore the plid argument).

Remaining tasks

User interface changes

None

Introduced terminology

None

API changes

None: this issue will add a configuration option to an existing process plugin, and it will have no effect on existing migrations. (Hypothetically, an existing migration might include the lookup_migrations option, which is not yet supported, and it is currently ignored.)

Data model changes

None

Release notes snippet

N/A

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

Merge Requests

Comments & Activities

  • Issue created by @benjifisher
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    In my opinion, the menu_link_parent process plugin should not be doing a migration lookup at all. That should be left to the migration plugin. Of course, this process plugin was added a long time ago, before the null_coalesce process plugin was added, so at the time it would have been awkward for the migration to handle it. For BC, we want to keep doing the same thing (by default).

  • Pipeline finished with Success
    10 days ago
    Total: 1375s
    #393086
  • Pipeline finished with Failed
    10 days ago
    Total: 95s
    #393164
  • Pipeline finished with Failed
    10 days ago
    Total: 502s
    #393169
  • Pipeline finished with Success
    10 days ago
    Total: 502s
    #393176
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Tests are passing. This issue is ready for review.

  • heddn Nicaragua

    Nice improvement to an existing migration to make this more flexible. There's tests that are passing. LGTM.

Production build 0.71.5 2024