Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | migrate_class_registration_link-1832754-3.patch | 940 bytes | samhassell |
migrate_class_registration_link.patch | 365 bytes | mikeryan | |
Comments
Comment #1
samhassell CreditAttribution: samhassell commentedHey 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.
Comment #2
mikeryanIt 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.
Comment #3
samhassell CreditAttribution: samhassell commentedHere'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.
Comment #4
mikeryanNote 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.
Comment #5
samhassell CreditAttribution: samhassell commentedall good!