Closed (works as designed)
Project:
Migrate Extras
Version:
6.x-2.x-dev
Component:
CCK
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2011 at 14:39 UTC
Updated:
5 May 2011 at 14:31 UTC
I get the following error when trying to load a migration class which has a date field mapping:
Fatal error: Declaration of MigrateDateFieldHandler::prepare() must be compatible with that of MigrateFieldHandler::prepare() in sites/all/modules/migrate_extras/date.inc on line 3
The attached patch fixes the error.
| Comment | File | Size | Author |
|---|---|---|---|
| migrate_extras_date_prepare_definition.patch | 518 bytes | stella |
Comments
Comment #1
mikeryanThis was already done, please pull the latest code: http://drupalcode.org/project/migrate_extras.git/commit/e5791fd
Comment #2
rvanderh1 commentedSorry, but where exactly does the patch go? I pasted the code in the date.inc template at the top, but now I get this error:
Parse error: syntax error, unexpected T_DEC in /sites/all/modules/migrate_extras/date.inc on line 3
I'm using Migrate and Migrate_Extras 6.x-2.0
Comment #3
ClearXS commented"This was already done, please pull the latest code: http://drupalcode.org/project/migrate_extras.git/commit/e5791fd "
=> That indeed is the code of the latest module I've installed, but gives that white error page after update.php with exactly the here mentioned error message.
The patch Stella mentions IS NOT in the latest release, I have no idea if its correct (don't know about PHP), but have changed this in:
modules/migrate_extras/date.inc
(there are programs that automatically make those changes, but I just get rid of lines with a "-" in front and put there the line(s) after a "+")
Comment #4
ClearXS commentedSorry for opening again; request confirmation if this is the patch for this error, or if there is a link to another patch?
Comment #5
mikeryanI misspoke. The current migrate_extras code (without the stdClass) is correct for the latest Migrate dev release, but won't work with Migrate 2.0. I'm afraid I confused things by forgetting to release Migrate Extras 2.0 at the same time as Migrate 2.0 - I later noticed the omission and released Migrate Extras 2.0, but after having made this change to the Date support so it Migrate Extras dev would work with Migrate dev. Things will get back in sync with Migrate/Migrate Extras 2.1, but for now you need to be using the Migrate dev release.