Closed (duplicate)
Project:
Migrate Extras
Version:
7.x-2.4
Component:
Media
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
12 Jun 2012 at 18:30 UTC
Updated:
17 Jun 2016 at 15:22 UTC
Jump to comment: Most recent
Comments
Comment #1
mikeryanTo add fields to files/images, you need to be using the Media module, which is supported by the Migrate Extras module, not Migrate itself. To pick up the fields you need to specify the 'image' bundle as the argument to MigrateDestinationFile() - see http://drupal.org/node/1546120#comment-5981846.
Comment #2
Anonymous (not verified) commentedI see. Correct me if I'm wrong, but isn't only one migration destination allowed per migration? That is to say, if I have both pdf documents and image files to migrate, at least two migrations are required with the suggested method?
I could not do something tricky like changing the destination on the fly, right? E.g.:
Comment #3
mikeryanThe cleanest thing to do is to have separate migrations, one with MigrateDestinationFile('image') and another with MigrateDestinationFile('default') (or whatever bundle you're using for the documents). But, you can get away with dynamically setting the fields you desire for each type. The admin UI, of course, is static - it only knows about the destination set in the constructor.