Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to upgrade CCK file fields on a D6 site to file fields and I have Media installed to migrate a couple of emfields. After completing the migration lots of EntityMalformedException
start to be thrown as the 'type'
field has not been populated.
It would be really useful if File entity could integrate with Content migrate to populate the 'type'
field when the file is created.
Comment | File | Size | Author |
---|---|---|---|
#1 | file_entity-content_migrate-1667606-1.patch | 1.28 KB | plach |
Comments
Comment #1
plachComment #2
Dave ReidHow are records getting saved to {file_managed} without going through the API of file_save() ?
Comment #3
plachIIRC the record is written directly to the db...
Comment #4
aaron CreditAttribution: aaron commentedwhat version of the migrate module are you using? From what I can tell, file_save() is called properly from sites/all/modules/migrate/plugins/destinations/file.inc, approximately line 268.
Comment #5
aaron CreditAttribution: aaron commentedoh wait, I see now that you are pulling data from embedded media Field. I did not even know that migrate supports that module. I would say that if it is writing directly to the database, however, that it exposes a bug with the migrate module.
Comment #6
aaron CreditAttribution: aaron commentedand now, I see that you are actually talking about the content migrate module, and not the migrate module. That's what I get for trying to review issues when I am tired.
Comment #7
aaron CreditAttribution: aaron commentedokay, so now I'm looking in the embedded media Field, and see at http://drupalcode.org/project/emfield.git/blob/refs/heads/7.x-1.x:/emfie... that the module properly calls $provider->save(), which in turn calls file_save() at http://drupalcode.org/project/media.git/blob/refs/heads/7.x-2.x:/modules...
So again, I need to ask what versions of what modules you are using.
Comment #8
plach@aaron:
Thanks for looking into this. I'm using the latest 7.x dev snapshot of CCK, see content_migrate.filefield.inc. It's an issue wth cck itself not emfield.
Not sure whether we should file a bug report in the CCK queue because they are not using the API, but I suspect this is intentional.
Comment #9
aaron CreditAttribution: aaron commentedyes, that does appear to be a bug to me. Moving to the CCK project.
Comment #10
aaron CreditAttribution: aaron commented