Migrate system broken if content_translation enabled

Created on 9 August 2018, over 6 years ago
Updated 11 September 2023, over 1 year ago

TLDR; if you enable content_translation without enabling migrate_drupal, all migrations are broken because of plugin discovery issues.

πŸ“Œ Experimental migrate_drupal_multilingual module Fixed introduced a major (critical?) bug on using the migration system with Drupal 8.6, when having content_translation enabled, but migrate_drupal disabled.

This is because d6_entity_reference_translation.yml and d7_entity_reference_translation.yml were moved to content_translation from migrate_drupal, but they use the Drupal\migrate_drupal\Plugin\migrate\EntityReferenceTranslationDeriver class that is only available if migrate_drupal is enabled.

In this probably very common setup (i.e. any new D8 site using content_translation), attempting to use the migration system will throw the following error:

In DerivativeDiscoveryDecorator.php line 218:

  Plugin (d6_entity_reference_translation) deriver "Drupal\migrate_drupal\Plugin\migrate\EntityReferenceTranslationDeriver" does not exist.

Some possible solutions:

1. Move d6_entity_reference_translation.yml and d7_entity_reference_translation.yml back to migrate_drupal - reverts part of the cleanup done in this patch, but is simple to do.
2. Move EntityReferenceTranslationDeriver to content_translation - cleaner solution, but breaks the API, as it would no longer be Drupal\migrate_drupal\Plugin\migrate\EntityReferenceTranslationDeriver and instead Drupal\content_translation\Plugin\migrate\EntityReferenceTranslationDeriver. These migrations are the only references in core to this deriver, and migrate_drupal was an experimental module until now, so maybe we're OK to break the API?

πŸ› Bug report
Status

Fixed

Version

8.6 ⚰️

Component
MigrationΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡΅πŸ‡ΉPortugal jcnventura

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.71.5 2024