Remove migration of shortcuts from menu_link migration

Created on 18 June 2020, over 4 years ago
Updated 2 February 2023, almost 2 years ago

Problem/Motivation

Executing the Drupal 7 menu link migration (d7_menu_link) triggers MigrateExceptions thrown by the d7_menu migration:

Config entities can not be stubbed.

I dived into and tried to determine why Drupal throws these exceptions. After setting up a breakpoint in EntityConfigBase it turned out that every time this exception was thrown the migrate_lookup plugin tried to get the destination ID of a menu shortcut-set-<#>.

I searched for that string in core and it turned out that the menu links which have this kind of menu_names are handled exclusively by the d7_shortcut migration: The d7_shortcut migration source plugin explicitly filters for this string: because these menu links are migrated into shortcut entities.

The menu_link migration is logging several error messages concerning shourtcuts. See #12 πŸ› Remove migration of shortcuts from menu_link migration Fixed

Proposed resolution

Since there is an another migration for shortcut menu links, let's add an another condition to the menu_link migration source plugin's query that explicitly excludes shortcut links.

With this change the menu_link migration test will not be generating errors.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
MigrationΒ  β†’

Last updated about 22 hours ago

Created by

πŸ‡­πŸ‡ΊHungary huzooka Hungary πŸ‡­πŸ‡ΊπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024