I'm trying use two group of migration named prepare and hn. I want make migration of hn group dependant from prepare group. I try this code without success:
/**
* Implements hook_migrate_api().
*/
function hn_migrate_migrate_api() {
$api = array(
'api' => 2,
'groups' => array(
'prepare' => array(
'title' => 'HNonline prepare migration',
),
'hn' => array(
'title' => 'HNonline',
'dependencies' => array('prepare'),
),
),
'migrations' => array(
'PrepareAttachment' => array(
'class_name' => 'PrepareAttachmentMigration',
'group_name' => 'prepare',
),
'PrepareImage' => array(
'class_name' => 'PrepareImageMigration',
'group_name' => 'prepare',
),
'Attachments' => array(
'class_name' => 'AttachmentsMigration',
'group_name' => 'hn',
),
'Articles' => array(
'class_name' => 'ArticlesMigration',
'group_name' => 'hn',
),
),
);
return $api;
}
How can i do this? Thanks!
Comments
Comment #1
mikeryanThat's a bug, I'll take care of it.
Thanks.
Comment #2
mikeryanCommitted, thanks.
Comment #3
havran commentedThanks for quick fix. In command line seems all ok but in Migrate UI i get notice:
Comment #4
mikeryanSee also #1989088: Notice: Undefined index: dependencies in MigrateGroup::getInstance().
Comment #5
mikeryanI've committed the patch in #1989088: Notice: Undefined index: dependencies in MigrateGroup::getInstance(). Note this is one of those cases where an issue is best reopened, when a problem is quickly found in a recent commit (this is why Drupal issues remain in the "fixed" state, visible in the default "Open issues" view, for two weeks before being closed) - I left things as they were because there was a patch in the duplicate issue.
Thanks.