My issue is that I have no idea why D6 images, migrated extending the DrupalFile6Migration, are correctly detected as the bundle or file type "image" in D7, but not the "documents". So my documents (pdf, txt, doc, ppt) end up as "undefined". I read a bit in filefield issue queue, see about whether a missmatch in the mimetype has something to do. it does not look like it per some testing ive done. I also seen that we may be able to set the bundle property in the object, but my first stab at it -- set the $file->bundle in my prepare() method to 'document' when appropriate.

The first extension of my class is here https://github.com/lter/deims/blob/7.x-1.x/modules/custom/deims_d6_migra... and well, i have extensions to this class to accommodate extra fields, such as this one. https://github.com/lter/deims-sevilleta-custom/blob/7.x-1.x/migration/Se... - bottom line, the file type is set for images, not for other types, and i wonder whether you've seen this, and better, what would be the place to set the bundle right as a workaround. the consequence of undefined file types is that i cannot set the file types fields subsequent migrations.

Comments

eneko1907’s picture

Turns out a good workaround and patch was placed in the migrate queue, and Mike checked the patch into the dev version. See
#2039649-14: Preserve $file->type if is set in prepare() method. This is then a duplicate.

Worked for me in two projects. Closing, marking as dupe.

eneko1907’s picture

Status: Active » Closed (fixed)