I was able to get the example working however after following http://drupal.org/node/1006984 to create my own I found that it did not show up in the list of available migrations.

I did notice that an install file was needed for the examples. Are install files needed for all uses?

I have the source table in my drupal db and the content type I am using to import to.

But no migration definitions???
I have attached a .zip file of my module and would really appreciate any help that could be given.

I would be happy to create/update the documentation if that is where the problem is once I get this working.

Drupal 6 and Migrate 2 both newest versions.

CommentFileSizeAuthor
cotn_migrate.zip5.15 KBCraigBertrand

Comments

CraigBertrand’s picture

Status: Active » Fixed

Okay thanks to awolfey on irc I have found my problem.

The hook_migrate_api() function was not correct. I have updated the documentation page to clarify that the module name must be used there and followed by _migrate_api

If anyone else finds this and is having the same issue then read http://drupal.org/node/1006982 it should work for you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

apotek’s picture

Version: 6.x-2.3-rc1 » 6.x-2.3

I am having this same issue. I implemented hook_migrate_api as suggested, like so:

<?php
function em_migrate_migrate_api() {
  $api = array(
    'api' => MIGRATE_API_VERSION,
  );
  return $api;
}
/** MIGRATE_API_VERSION is defined by migrate module as (int) 2. */
?>

In previous versions of migrate (before 2.3), when I would create a new migration class, it would just automagically create an entry in migrate_status and migrate_map_* table and message table as well. Now, in 2.3, it doesn't. My old migrations work fine, I just can't seem to create new ones.

I'm using latest dbtng and autoload v 2 for D6.

Running drush ms, the new migration classes simply don't show up.

One item of note is that I am using two levels of abstraction:

migrate base
- migration extends base
-- MyAbstractMigration extends migration
--- MyMigration extends MyAbstractMigration

But this has always worked before.

Of course, the new classes are also included in mymodule.info etc.

Based on this conversation (http://drupal.org/node/1578792) I also checked my autoload_registry, and my new classes are included there, so autoload does not seem to be the issue.

Then, based on comment #9 in the above, I added this to my info file:

<?php
files[] = MyMigrate.module
?>

even though it felt wrong. Still no joy.

In desperation, I finally started to manually add entries to migrate_status table for my new migrations. Now, and only now did things start to look up. But why isn't this being done automatically anymore?

Any thoughts?