Include file fields in File source plugin if file_entity module is enabled

Created on 16 September 2021, about 3 years ago
Updated 17 November 2024, 4 days ago

Problem/Motivation

File Entity β†’ module makes file entity in Drupal 7 fieldable. Obviously, people will want to migrate some of this information stored in File fields into Drupal 9 website and save it in a Media entity, for example.

Currently, the Drupal\file\Plugin\migrate\source\d7\File source plugin is not aware of any potential fields, so they're not available in the processing pipeline.

Proposed resolution

1) Change the base class for File source plugin from DrupalSqlBase to FieldableEntity, that provides helper methods to retrieve entity values;
2) Add field values to the source row if file_entity module is present.

Remaining tasks

1) Verify language retrieval from entity_translation settings;
2) Add tests?
3) Review, commit.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡¦Ukraine Matroskeen πŸ‡ΊπŸ‡¦ Ukraine, Lutsk

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