Posted by alanburke on January 31, 2012 at 10:31pm
4 followers
Jump to:
| Project: | Migrate Extras |
| Version: | 7.x-2.x-dev |
| Component: | Media |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'm using the migrate module to migrate content from a D6 site.
The D6 site used the image module, with image_gallery.
I can create Gallery nodes [terms in the D6 site].
I can create Media items [image nodes in the D6 site] using MigrateDestinationFile.
What I can't do is wire them together.
It would appear that media items are stored as a reference on the Gallery node.
So I should be able to map that.
I can get a comma separated list of file ids, [or what was their Node ids before import],
so passing that in like this should work
<?php
// $media_list looks like this
// $query->addExpression('GROUP_CONCAT(n.nid)', 'media_list');
//$media_list = "234,456,789";
// Pass in the list if images
$this->addFieldMapping('media_gallery_media', 'media_list')
->sourceMigration('GalleryImage')
->arguments(array('source_type' => 'fid'))
->separator(',');
?>but it doesn't.
Any clues?
Comments
#1
Maybe somebody on the Migrate module side might be able to shed some light?
I can create Media Gallery nodes and Media items but I'm trying to tie them together with no luck.
The Media items are migrated first, then the Media Gallery nodes.
The code above is in the field mapping for the media gallery node.
#2
Hi Alan, I hope I'm not sending you off on the wrong path, but have you tried the Migrate Extras module? http://drupal.org/project/migrate_extras
I've not used it yet, but I think it might be of use to you
#3
Contrib module support goes in Migrate Extras, not Migrate.
#4
#5