Problem/Motivation

As a Drupal 7 user, I want to have my youtube fields migrated to media fields and the corresponding field values to media entities.

API changes

  • New migration: d7_youtube_field which migrates the field values to media entities.
  • New migrate source plugin: youtube which provides the source field values.
  • An improved media_internet_field_value migrate process plugin.
  • New field migration plugin: youtube which changes Drupal 7 youtube fields to Drupal 9 media fields.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yash.rode created an issue. See original summary.

yash.rode’s picture

Title: Migrate Youtube Field module from D7 to D9. » Migrate Youtube Field from D7 to D9.
yash.rode’s picture

Status: Active » Needs review
StatusFileSize
new81.88 KB

Youtube field to media migration.

Status: Needs review » Needs work

The last submitted patch, 3: Migrate_Youtube_field_from_D7_to_D9-3272705-3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

yash.rode’s picture

StatusFileSize
new81.37 KB
new1.63 KB
yash.rode’s picture

Status: Needs work » Needs review
StatusFileSize
new81.42 KB
new1.29 KB

Source query changed->added orderBy() to get the same result on local as well as DGO.

huzooka’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

#6 is perfect!

Thank you, @yash.rode!

  • huzooka committed 35cd13f on 8.x-1.x authored by yash.rode
    Issue #3272705 by yash.rode: Migrate Youtube Field from D7 to D9
    
huzooka’s picture

Status: Reviewed & tested by the community » Needs work

...and I just noticed what's wrong:

We have to make sure that these youtube field migrations are executed after the other media from plain files and media from media migrations: because if d7_youtube_field is executed before them, then we will have a media entity ID conflict!

I won't revert the commit, but this should be addressed.

yash.rode’s picture

Status: Needs work » Needs review
StatusFileSize
new379 bytes

Added migration dependencies to make sure youtube field migration is executed after the other media from plain files and media from media migrations are executed.

huzooka’s picture

Status: Needs review » Fixed

The underlying issue (the assumption on source fid === destination mid) was addressed in #3281055: Media entity migrations shouldn't migrate file IDs to media IDs.

@yash.rode, thank you again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

emerham made their first commit to this issue’s fork.