Download & Extend

Support for Emvideo CCK field (Embedded Media Field)

Project:Migrate Extras
Version:7.x-2.x-dev
Component:Media
Category:feature request
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

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);
AttachmentSize
emvideo.patch2.42 KB

Comments

#1

I would love this for D7...

#2

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?

#3

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.

#4

Status:needs work» patch (to be ported)

#5

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

#6

Hi,
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

#7

@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

#8

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

#9

@Summit Problem comes on line 34 of migrate_extras.module

It's MigrateEmvideoFieldHandler not MigrateEmvideoHandler.

#10

Status:patch (to be ported)» reviewed & tested by the community

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