I have found that there is a bug in the migrate code for files where it will not set the filename or the filemime when using the file_link or file_blob operation. This is due to a strange occurance where in all of the other operations the file is based on the source object that is previously built using "$file = clone $source;" however when using file_link or file_blob it instead declares a new object and doesn't have those parameters set (code: "$file = new stdClass;").
The fix is to replace the latter with the former. I have done that in my code and I will attach the patch here to my first comment. Let me know if there was a reason for doing it the other way in the first place. So far I can't see one.
Comment | File | Size | Author |
---|---|---|---|
#1 | fix_missing_filename_and_filemime-1341598-1.patch | 672 bytes | patrick.thurmond@gmail.com |
Comments
Comment #1
patrick.thurmond@gmail.comHere is the patch.
Comment #2
mikeryanCommitted, thanks!