Closed (fixed)
Project:
Migrate Plus
Version:
8.x-2.x-dev
Component:
Plugins
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2015 at 14:59 UTC
Updated:
19 Aug 2016 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
heddnComment #3
heddnComment #4
heddnThis is no longer blocked. But moving over to the migrate_plus issue queue. This isn't a feature that is needed for migrating from another Drupal instance.
Comment #5
heddnBased on top of #2642612: Create Entity Lookup & Generate process Base plugins.
Comment #6
heddnComment #7
heddnComment #8
heddnThis will need more work. Need to parse out the filename to only the base name when creating the new file.
Comment #9
mikeryanI need this on 8.1.x for my current project.
Comment #10
mikeryanWell, it turned out I didn't need it for that project in April - but I do for this week's project, so I'll be seeing if I can complete this patch within the next day.
Comment #11
mikeryanA big piece missing here is actually copying the file into the files directory. Drupal 8.2.x should be introducing a general-purpose file_copy process plugin for this in #2695297: Refactor EntityFile and use process plugins instead - I'm thinking that the best solution here would be to add that plugin to migrate_plus in 8.x-2.x (which will be compatible with core 8.1.x only), and remove in 8.x-3.x (which will be compatible with core 8.2.x and up). Maybe add the urlencode process plugin from that patch as well...
Comment #12
mikeryanI think if we do #2765733: entity_lookup should support file/image destination fields, we won't need the file_generate process plugin, just the file_copy plugin.
Comment #13
mikeryanYes, a combination of #2765733: entity_lookup should support file/image destination fields and the file_copy plugin does the job without a specialized generation plugin. Here's what the relevant parts of my migration look like to leverage this:
Comment #15
mikeryanSigh... Thought I had committed this, so I though it was in beta2...