- πΊπ¦Ukraine HitchShock Ukraine
It looks like the issue is outdated. In the description uses the source plugin for D9 but atm we have a separate source plugin for D7.
Please check examples in migrate_file_to_media_example module. - πΊπΈUnited States alison
Just in case it's at all helpful to anyone who stumbles upon this thread... Here's what I did:
- I started with the instructions on the project page: https://www.drupal.org/project/migrate_file_to_media β
- BUT, in the generated βstep1β migration, I modified the source plugin to
media_entity_generator_d7
- Then, after importing the migration configs...
- I ran
drush migrate:duplicate-file-detection cwd_migrate_cvm_mf2m_canine_image_step1
- Then
drush mim cwd_migrate_cvm_mf2m_canine_image_step1
- Then
drush mim cwd_migrate_cvm_mf2m_canine_image_step2
I didn't do the "everything in one go" option (i.e. I didn't add the
media_file_copy
process that's in the D7 to D7 example YML), because we need all files migrated over for this migration, not just files referenced in file fields (therefore, we're just usingupgrade_d7_file
from Drupal core to do the file entity migration).-------
Anyway, hope this helps! - πΊπΈUnited States jsutta United States
Posting this in case it helps anyone else. I had to change the
source_langcode
andlangcode
values in thesource
key fromund
toen
.