It's a long story, but due to fatal errors in certain environments triggered by Migrate's automated registration of migration and handler classes, as of Migrate 2.5 it will be possible to disable auto-registration, and any module implementing migration or handler classes should explicitly register them via hook_migrate_api() to continue working when auto-registration is disabled. Adding this registration will have no effect with Migrate 2.4 or earlier.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

samhassell’s picture

Hey Mike,

I may be wrong but I think the api hook needs to move into link.migrate.inc

I couldn't get it working until i made this change.

Thoughts?

I can reroll if you think it needs to be changed.

mikeryan’s picture

It shouldn't technically be necessary, any hook should work in .module, but yes, using .migrate.inc is a best practice. I wanted to keep this issue purely focused on the registration, but moving the hook to .migrate.inc would be a bonus.

samhassell’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
940 bytes

Here's a patch that moves the migrate api hook into link.migrate.inc.

I was having some caching issues before, and can now confirm that the patches work as expected.

Setting to RTBC somewhat tentatively coz I supplied a patch, but its a pretty small one and i have tested it.

Maintainers can choose between moving or not moving the api hook.

mikeryan’s picture

Note that I've posted a consolidated patch in #1010850: Update MigrateFieldHandler to work with migrate-7.x-2.4 and later that would supercede this.

samhassell’s picture

Status: Reviewed & tested by the community » Fixed

all good!

Status: Fixed » Closed (fixed)

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