Add d8 media migration

Created on 14 December 2016, almost 8 years ago
Updated 20 September 2023, about 1 year ago

Problem/Motivation

This is a sub-task of #2930514: [meta] Migration to media β†’ , currently targeted at adding the corresponding source/destination plugins in order to be able to migrate data into media entities.

Proposed resolution

Remaining tasks

Update the documentation on https://www.drupal.org/node/2637890/edit β†’ (the migrate documentation currently only describes file migrations).

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡©πŸ‡ͺGermany dawehner

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.

  • πŸ‡ΊπŸ‡ΈUnited States joshuasosa

    I have a Drupal 9 install post Drupal 7 migration where files exist in the Files area but not in the Media area. The new site is in a good state, and I'm not sure if other Drupal 7 to 9 migrations would create duplicates or conflict with what's already in the Drupal 9 site's Files area. I also don't know if media_migration actually has anything yet for files that exist in a Drupal 9 Files area but not in Media. All I saw was stuff for Drupal 7, including patch 72 here, which is not what I needed. I basically don't care about Drupal 7 and just want Drupal 9 Files converted to Drupal 9 Media.

    For anyone else needing to migrate/convert Drupal 8/9/10 Files to Media:
    The patch from #38 is exactly what I needed. After patching, I copied file_media.yml to my own module's config/install/migrate_plus.migration.file_media.yml like #36 mentions and changed the definition for file to document like Drupal 9/10 has. The only other change needed was to change Unicode::strtolower to mb_strtolower in core/modules/media/src/Plugin/migrate/source/File.php. I ran drush mim file_media and it successfully added Media entries.

Production build 0.71.5 2024