Problem/Motivation

As a follow up of #2831274: Bring Media entity module to core as Media module and as part of #2825215: Media initiative: Roadmap we will need to provide migrate integration for the media entity.

This is a meta issue destined to track progress on all sub-tasks that this plan entails.

Proposed resolution

  • Add a file source plugin to be able to source from all permanent files on the system
  • Add media entity destination plugin to be able to migrate stuff into media entities.
  • Provide example migration to migrate files into media entities. This would use the existing file entities, but then wrap them into media entities. (Probably in #2835825: Add d8 media migration too?)
  • Provide migrations/update paths for file/image field configurations. They should become entity reference fields that reference the migrated media entities. #2885002: Provide an optional migration path for sites using files/images to media entities
  • Provide a migration example for an actual file field
  • Provide a migration example for an actual image field
  • Provide a migration example for the file/image field display configuration.
  • ... more?

Remaining tasks

User interface changes

API changes

Data model changes

Comments

catch created an issue. See original summary.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

marcoscano’s picture

Updating the IS to include all the proposed steps.

heddn’s picture

Issue summary: View changes

Re-wording the IS to account for the fact that a source isn't needed and the destination probably too.

mpp’s picture

Provide example migration to migrate files into media entities. This would use the existing file entities, but then wrap them into media entities. (Probably in #2835825: Add d8 media migration too?)

Wrapping a file entity in a media entity is one thing but it's not clear how one could migrate the alt/title values this way?

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

damienmckenna’s picture

Given the work towards supporting Media in WYSIWYG (#2801307: [META] Support WYSIWYG embedding of media entities), has anyone looked at migrating from the media_wysiwyg module in D7 to Media in D8?

damienmckenna’s picture

I found https://www.drupal.org/project/entity_embed/issues/2821205 but that's on hold until Entity Embed 1.0 is released..

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

benstallings’s picture

Here's an anonymized copy of a working migration someone could start from:

langcode: en
status: true
dependencies: {  }
id: d7_media
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags:
  - 'Drupal 7'
  - Content
label: 'media entities'
source:
  plugin: d7_file
  scheme: public
process:
  bundle:
    plugin: static_map
    source: filemime
    map:
      image/gif: image
      image/jpeg: image
      image/png: image
      image/svg+xml: image
      image/webp: image
    default_value: document
  file_id:
    plugin: skip_on_empty
    source: fid
    method: row
  field_media_document/target_id: '@file_id'
  field_media_image/target_id: '@file_id'
  name: filename
  uid: uid
destination:
  plugin: 'entity:media'
migration_dependencies:
  required:
    - d7_file
  optional: {  }

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.