Entity metatag migrations fail unless metatag migrations are run before entity migrations

Created on 18 May 2022, about 2 years ago
Updated 13 June 2024, 14 days ago

Problem/Motivation

Migration of entity-specific metatags works with both migrate_tools and core migrate commands. However, it only works if the metatag migrations have been run before the node migrations.

Marked as a feature request, but it feels like a bug when one cannot work out why metatag migrations have failed.

Steps to reproduce

Run a D7 to D9 migration. Enable Metatag but perform no setup or migration of metatag until the node migrations are complete.

Note, users may not be aware that in D7 the metatag data is in the metatag table, and in D9 it is part of the entity. So I was puzzling why node-specific metatags had not been migrated.

Proposed resolution

Where metatag is present, and is to be migrated, making entity migrations dependent on metatag migrations makes sense. Alternatively, a warning when running entity migrations would help.

If that is difficult to obtain, some kind of documentation, possibly including an inline / cli warning on the metatag migrations, warning that they do not include entity-specific data and must be run before entity migrations, would be better than nothing.

Remaining tasks

(Unlikely) Work out whether it is realistic to make entity-specific migrations not depend on migration and setup of metatag defaults and settings

(If the previous approach is a "no") Decide whether making entity migrations dependent on Metatag migrations is a good idea. If so, try to make it happen.

(If the previous approach is not realistic) Document, and maybe inlcude cli warnings and inline help, on metatag migrations drawing attention to the issue.

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Importing/migrating data

Created by

πŸ‡¬πŸ‡§United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
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.69.0 2024