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.
When migrating from Drupal 6 to Drupal 7 using CCK module, but without migrate, fatal error happens due the missing migrate module:
+ drush -y content-migrate-fields
PHP Fatal error: Class 'MigrateSimpleFieldHandler' not found in /var/www/dfr7/www7/sites/all/modules/contrib/phone/phone.migrate.inc on line 34
Migrate is not a hard dependency for this module, and must remain optional, the right way to solve this is to move the MigratePhoneFieldHandler
class definition into its own file, and specify this file into the files[] info for core to be able autoload it. Proceding this way, this class will be loaded only when the migrate module will spawn it and avoid those fatal errors in all other cases.
I am writing a patch, wait a few minutes.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1867340-1-phone-migrate_handler_fatal_errors.patch | 1.36 KB | pounard |
Comments
Comment #1
pounardComment #2
ArtusamakI confirm that the code looks ok, we bumped into this issue and the patch solved it.
Comment #3
wavesailor CreditAttribution: wavesailor commentedFYI: I just downloaded and enabled the migrate module and this issue went away
Comment #4
pounardWhich is heretic, this dependency should not be forced.
Comment #5
crutch CreditAttribution: crutch commentedthis patch works well only tested with dev version, phone migration complete, thank you
Comment #6
troybthompson CreditAttribution: troybthompson commentedThis solved my upgrade problem as well.