Migrate Magician Menu Links should not hard code migration IDs

Created on 9 February 2023, about 2 years ago

Problem/Motivation

Expand the MigMagMenuLinkMigrate fix to support migration configs generated with prefixes (otherwise it's not working currently).

Steps to reproduce

Generate the d7_* migrations with

drush migrate:upgrade --configure-only --migration-prefix=mysite_ --legacy-db-key-migrate --legacy-root=http://mysite.com

This will generate all migrations with the "prefix", e.g.

mysite_d7_menu
mysite_d7_menu_links
mysite_...

When you try to run `drush mim mysite_d7_menu_links`, the `MigMagMenuLinkMigrate::applyMenuLinkMigrationConfigurationFixes` will not trigger, because it's expecting exact migration ids like `d7_menu_links`.

Proposed resolution

Change from using in_array to preg_match at the end.

Remaining tasks

Patch.

API changes

No changes.

πŸ› Bug report
Status

Active

Version

1.8

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada yang_yi_cn

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

Comments & Activities

Production build 0.71.5 2024