1. Define a set of static migrations in code
2. Define a group $groupname in hook_migrate_api() and assign the migrations to it
3. Register the migrations

expectation: the registered migrations appear in the UI at admin/content/migrate/groups/$groupname
actual: no migrations appear in the UI for the group

Comments

justindodge’s picture

I'm having this issue as well - I can see my registered migrations via drush ms, but they are not appearing in their group via the web UI. To be clear, the group itself appears and is clickable, but no links inside.

Interestingly, I can go to the URL directly of the migration: /admin/content/migrate/groups/business/BusinessBlogs and see the expected page.

Here's what a chunk of my hook_migrate_info looks like:

/**
 * Implements hook_migrate_api().
 */
function migrate_business_migrate_api() {
  /**
   * declare the api version and migration group.
   */
  $api = array(
    'api'        => 2,
    'groups'     => array(
      'business '=> array(
        'title' => t('business.x.com'),
      ),
    ),
    'migrations' => array(
      // NODE MIGRATIONS //////
      'BusinessBlogs'  => array(
        'class_name'        => 'BusinessBlogsMigration',
        'group_name'        => 'business',
        'description'       => t('Migration of "Blog Entry" (blog) nodes into "Blog Post" (blog_post) nodes'),
        'source_type'       => 'blog',
        'destination_type'  => 'blog_post',
        'source_connection' => 'business',
        'source_version'    => 6,
        'dependencies'      => array(),
      ),

...
return $api;
dakku’s picture

subscribe

mikeryan’s picture

Did you try clearing cache? Is the group machine name properly set in the migrate_status table, and matching a row in the migration group table?

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)
justindodge’s picture

I've definitely cleared every kinda of cache as well as the static migration registry (or whatever that button is called... it's not in front of me sorry) a dozen times at least.

Removing 'group_name' from the definition fixed it immediately (but of course it ends up in the default group).

I'm not sure about the migrate_status table, I may not have an opportunity to troubleshoot more any time soon - sorry.

justindodge’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I had a chance to revisit this - after a bunch of poking around in stupification, I was shocked to find an extraneous white space in my definition for the group. It's even right up above there in the code I pasted. I can't believe how many times I looked over this code and didn't see it.

Anyway, that's programming for ya.

dankegel’s picture

Newbie here. I tried adding a migration, and "drush ms" remained stubbornly empty.
I solved the mystery with "strace -o slog -f -e trace=file drush ms", then grepping
through slog for the directory my migration module was in. Turns out I misnamed
the file; drush was trying to open foo.migrate.inc, but I had named it foo.inc. Yay low level OS tools :-)