Using the new UI wizard I am able to migrate everything from a D6 site to D7 except the file / image fields. If I enable the media module all the files are correctly being added to media, but not to the nodes with the file fields. I put the correct path to the files in the wizard and tried tweaking the mappings, but can still not get them to import.

Can someone that has successfully migrated a content type with a file provide a screenshot of the mappings or provide any tips that would help.

Thanks for this most excellent module!

Comments

hoZt’s picture

Title: Unable to Migrate File Types Using D2D_UI » Unable to Migrate File Fields Using D2D_UI
Steve Hanson’s picture

I would like to pitch in here as well for some help on this. It's not at ALL clear to me how this is supposed to work. This is the use case:

Drupal 6 to Drupal 7 migration, attempting to use the UI for this.

Most content types move over just fine, but I am having a terrible time with CCK types that have file fields. I"ve tried to transliterate from the docs on doing this in PHP code to doing it in the UI, but with no joy. I can get all the files migrated over more or less using the file migration just as it comes out of the box in the UI. But then I cannot get any of the actual file fields to connect to the files themselves. Clearly what is being parsed in here is the id of the file, as I will typically get a ton of errors trying to copy over the (non-existant) file names that are the file ids' But I do not really understand how one can adjust the mapping in the D2D UI to actually make this work. From all the issues filed in here I am clearly not the only one, and I think a simple example of this would be really helpful (and I'm REALLY willing to write up a "using the D2D UI for migrations for dummies" document once I stop being a complete dummy and only a half-dummy.

Thanks for any help you can give on this. I've really tried to RTFM but I don't see anything that has actually helped me.

mikeryan’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#2000160: Update documentation for migrate_d2d 2.1

Documentation for the upcoming 2.1 release is not yet done, there is an existing issue for this at #2000160: Update documentation for migrate_d2d 2.1.

File fields are tricky. Besides getting the source path right when configuring the migration of the files themselves, the field mappings referencing them have multiple moving parts. In the field mapping editor, for the file field itself you need to set the source migration to the name of the file migration. Then, right under that, you should see a ':file_class' subfield - set the default value in that line to MigrateFileFid. That tells the file field handler that it's getting the fids it needs directly through the field mapping.

inteja’s picture

In the field mapping editor, for the file field itself you need to set the source migration to the name of the file migration. Then, right under that, you should see a ':file_class' subfield - set the default value in that line to MigrateFileFid.

@mikeryan thanks very much!