Download & Extend

Class registration for Migrate 2.5 or later / please commit patch

Project:Date
Version:7.x-2.x-dev
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

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. This patch registers the Date field handler.

AttachmentSizeStatusTest resultOperations
migrate_class_registration.patch364 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 5,216 pass(es), 0 fail(s), and 1 exception(s).View details | Re-test

Comments

#1

Status:needs review» needs work

The last submitted patch, migrate_class_registration.patch, failed testing.

#2

Status:needs work» needs review

Right, the example module also needs to register its migration class...

AttachmentSizeStatusTest resultOperations
migrate_class_registration-1832544-2.patch1.41 KBIdlePASSED: [[SimpleTest]]: [MySQL] 5,238 pass(es).View details | Re-test

#3

Status:needs review» reviewed & tested by the community

Code is clean and causes the Date Migrate module to function correctly with the Migrate module v7.x-2.5.

#4

I can also confirm that this works when auto-registration is turned off.

#5

Priority:normal» major

Upgrading priority - migrating into date fields is completely broken with Migrate 2.5 or greater without this patch.

#6

Yes I can confirm that patch provided in #2 works well also for me.

Can this be committed please?

#7

I can also confirm that this fixes Date Migrate with Migrate 7.x-2.5.

#8

Title:Class registration for Migrate 2.5 or later» Class registration for Migrate 2.5 or later / please commit patch
Category:task» bug report

I can also confirm that this works with 'migrate 7.x-2.5+107-dev (2013-Apr-25)', but NOT works without it.

Please take a look at #1981162-1: No handler for date_migrate.

Thank you for updating in the very next days.

Wusel

#9

Status:reviewed & tested by the community» closed (duplicate)

Thanks for the patch, it works for migation issue, which is topic-starter, but it is not enough to fix the issue from #1835214: Automated tests failing - Exception thrown in Date2 migration.
Closing as a duplicate of that issue, because it has an improved version of this patch.

#10

Status:closed (duplicate)» reviewed & tested by the community

We have a long-standing patch here in RTBC status, closing it in favor of a newer patch is unhelpful in terms of getting it in.

#11

If you prefer RTBC - I wouldn't mind.
Just keep in mind, that this patch is not enough, it doesn't really fix issue from #1835214: Automated tests failing - Exception thrown in Date2 migration, though it looks good for this concrete issue. In fact both patches do have common basis, I based on this one while creating my patch, thank you.

nobody click here