Reviewed & tested by the community
Project:
Migrate Extras
Version:
6.x-2.x-dev
Component:
Media
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2012 at 23:30 UTC
Updated:
11 Jul 2013 at 23:46 UTC
Here you are my two cents from migrating emvideo fields. This patch is ready to be extended to support more emfield modules like emimage, emaudio, ...
Instructions for developers:
The example field mapping code below shows how to import video urls in emvideo field.
Note that these code snippet must go into your Migration subclass's constructor - see the migrate_example module for an example of how and where to use field mappings.
// Import source field "url_video" containing urls into
// destination field field_emvideo:
$this->addFieldMapping('field_emvideo', 'url_video');
// Import source field "url_video" containing names into
// destination field field_emvideo (youtube provider is the default,
// so it's not needed to pass this argument in this case):
$arguments = MigrateEmvideoFieldHandler::arguments('youtube');
$this->addFieldMapping('field_emvideo', 'url_video')
->arguments($arguments);
| Comment | File | Size | Author |
|---|---|---|---|
| emvideo.patch | 2.42 KB | trunks |
Comments
Comment #1
cdracars commentedI would love this for D7...
Comment #2
mikeryanCommitted to D6. I would think that it should work as-is on D7 as well - can anyone who uses Embedded Media Field on D7 test this?
Comment #3
mikeryanActually, with a moment's thought I recall that the field array structure is slightly different for D7, so this will need a little work.
Comment #4
mikeryanComment #5
trunks commentedI'll try to modify it asap. Actually it's a little modification.
Comment #6
summit commentedHi,
Got following error on D6 with admin/content/migrate/handlers:
Any one familiar with this?
Thanks a lot in advance for your reply!
Greetings, Martijn
Comment #7
mthomas commented@Summit it seems like migrate extras is looking for a handler that doesn't exist in the D6 version of migrate. You can get rid of the error by commenting out the reference to it in migrate_extras.module
Comment #8
summit commentedok, but I have emvideo content. Is that than still converted?
greetings, Martijn
Comment #9
david.lopez commented@Summit Problem comes on line 34 of migrate_extras.module
It's MigrateEmvideoFieldHandler not MigrateEmvideoHandler.
Comment #10
summit commentedYep that was the case! No it is working. Thanks!
greetings, Martijn
Comment #11
densolis commentedI am running Migrate 6.x-2.5-rc2_1-dev with Migrate Extras 6.x-2.5. The issue noted in comment # 6 cause Migrate to crash.
I am migrating the D6 user profile, which does not have a video field, to D6 (yes D6 to D6). But I still received the error. However, the fix mentioned comment # 9 worked.
Do you already have a patched or do you want me to provide this one?