Active
Project:
Migrate Plus
Version:
8.x-2.x-dev
Component:
Examples
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 Nov 2015 at 16:11 UTC
Updated:
12 Apr 2023 at 09:38 UTC
Jump to comment: Most recent
The one missing piece now to the beer example is a demonstration of image migration. Since this will be the first introduction to D8 migration development for many, it's important to start off with best practices, so unlike the D7 version we'll show how to migrate files in a separate migration, referenced by the node migration.
Comments
Comment #2
charginghawk commentedmikeryan - while waiting for this issue to be resolved, can you quickly describe what best practices should be for image migration?
I'm working with image migration right now, and even a brief outline of the procedure would be very helpful in the interim.
Comment #3
mikeryanBest practice in general is to migrate file assets in their own migration and reference them (with the migration process plugin) from any other entity that needs them. To my mind, creating entities as side-effects of migrations rather than explicitly in their own migration is problematic on multiple counts
Comment #4
ressaHas an example been included yet in the beer example?
Comment #5
mikeryanNo, this issue is still open.
Comment #6
mikeryanActually, let's wait until #2695297: Refactor EntityFile and use process plugins instead is done, and add this in the 8.2.x-compatible branch of migrate_plus once that's opened.
Comment #7
mikeryanComment #8
moshe weitzman commentedComment #9
youfei.sun commentedAny updates on this issue please?
Comment #10
ressaIt would be really great with a working example of how to import an image. There is part of an example in #2635622: Process plugin for importing/creating files by URL, but I can't quite figure out how to piece it all together...
Comment #11
mikeryanThe EntityFile patch is in core 8.2.x, so we'll be able to address this once I open the 8.x-3.x branch supporting 8.2.x and up.
Comment #12
ressaFantastic, I look forward to that release, thanks!
Comment #13
nicrodgersDoes anyone have any working config/code examples for migrating an image in to 8.2.x? I can't seem to find anything :(
Comment #14
maijs commented@nicrodgers, try migrate_source_example module (8.2.x branch). Take a look at migration example from CSV files, it has been updated to work with Drupal 8.2.
Comment #15
youfei.sun commentedI think #14 is not helping, any hints on that?
p.s. looking at those files, i did have step through a bit, but I can't make the file_copy plugin right or there is some other issues,
all my attempts for migrating a single file entity failed with no detailed information, a clear beer example for migrating file entity would be optimal
Comment #16
youfei.sun commentedFrom #6 , what I get is that from drupal 8.2.x we can use something like
for an file entity, but this did not work in my case, did I miss anything in that thread?
Comment #17
summit commentedHi, any progress in adding image example please?
Greetings,