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')
emvideo.patch2.42 KBtrunks


cdracars’s picture

I would love this for D7...

mikeryan’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Committed 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?

mikeryan’s picture

Status: Needs review » Needs work

Actually, with a moment's thought I recall that the field array structure is slightly different for D7, so this will need a little work.

mikeryan’s picture

Status: Needs work » Patch (to be ported)
trunks’s picture

I'll try to modify it asap. Actually it's a little modification.

Summit’s picture

Got following error on D6 with admin/content/migrate/handlers:

Fatal error: Class 'MigrateEmvideoHandler' not found in /migrate/migrate.module on line 290

Any one familiar with this?
Thanks a lot in advance for your reply!
Greetings, Martijn

mthomas’s picture

@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

Summit’s picture

ok, but I have emvideo content. Is that than still converted?
greetings, Martijn

david.lopez’s picture

@Summit Problem comes on line 34 of migrate_extras.module

It's MigrateEmvideoFieldHandler not MigrateEmvideoHandler.

Summit’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Yep that was the case! No it is working. Thanks!
greetings, Martijn

densolis’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Category: feature » bug

I 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.

Got following error on D6 with admin/content/migrate/handlers:

Fatal error: Class 'MigrateEmvideoHandler' not found in /migrate/migrate.module on line 290

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?