Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297886

ContentEntity migration source adds revision ID as source key, incompatible with Drupal 8.8 and earlier

$
0
0

Problem/Motivation

In #2746541: Migrate D6 and D7 node revision translations to D8, the content_entity source plugin was changed, adding the revision ID as a source key if the source entity type is revisionable. This makes the migration mapping table inconsistent between Drupal 8.8 and later versions. This is a serious problem for sites that use the content_entity source plugin in recurring migrations.

This manifests in two ways:

  • Existing migrations throw "Column not found: 1054 Unknown column 'sourceid3' in 'field list'" for the migrate_map_* table
  • If that table is fixed (or does not exist in the first place), the migration breaks, as new revisions create new target objects, when they should update the target object.

Proposed resolution

Add the new, optional, boolean configuration key 'add_revision_id', defaulting to TRUE.

If 'add_revision_id' is not specified, or if it is TRUE, then include the revision ID if the source entity type supports revisions. This is the same behavior as Drupal 8.9, 9.0, and 9.1.

If 'add_revision_id' is FALSE, then do not include the revision ID. This is the same behavior as Drupal 8.8 and earlier.

Remaining tasks

Update the patch following comments #38-42.

User interface changes

None.

API changes

API addition: a new. optional configuration key for the content_entity source plugin.

Data model changes

None.

Release notes snippet

None.


Viewing all articles
Browse latest Browse all 297886

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>