Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The migration system doesn't yet support migrating Drupal 7 entity reference fields, along with their settings and values, from Drupal 7 to Drupal 8. The source module is https://www.drupal.org/project/references.
Proposed resolution
Add a field plugin to handle Drupal 7 entity reference fields.
Remaining tasks
- Write the field plugin
- Write tests of said plugin
- Update the Drupal 7 fixture with an entity reference field or two
- Update our integration tests to ensure that the entity reference fields and their configurations are migrated correctly
- Update other integration tests to ensure that entity reference fields' values are migrated properly
- Commit the patch
- Cuddle several kittens
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
phenaproximaPostponing on #2447727: Add base class for migrating reference fields.
Comment #4
davidsickmiller CreditAttribution: davidsickmiller commentedI'm working on migrating from a D7 site to Drupal 8.3.3, and it looks like the entity references are working. Did the plugin already get written?
Comment #7
quietone CreditAttribution: quietone as a volunteer commentedadd related issue
Comment #10
quietone CreditAttribution: quietone as a volunteer commentedAdd source module
Comment #13
quietone CreditAttribution: quietone as a volunteer commentedLooking at core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php I see assertions for node user and term entity reference fields. Those assertions were committed in #2611066: Migration path to entity reference field from 7.x. And the d7 EntityReference field plugin was committed in #2901851: Replace the static map in the d7_field migration by field plugins.
I am not sure what is to be done here.
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedDouble checked and this has been in since 8.3.x.