Because this module establishes a new field type, the Migrate module is unable to store any values in Phone fields used as endpoints in field mappings. Adding a child class of MigrateFieldHandler and an implementation of hook_migrate_api() should enable migration of Phone fields.

Members fund testing for the Drupal project. Drupal Association Learn more


jpklein’s picture

Here's a patch that should work with version 2.4 of the Migrate module.

jrsinclair’s picture

This helped me out a lot. Thank you.

jrsinclair’s picture

Status: Active » Needs review
becw’s picture

There's a slightly simpler way to implement the migration class--extend the MigrateSimpleFieldHandler that migrate provides. Patch attached.

Both approaches work for me, though.

becw’s picture

Title: Field Handler for Migrate module » Field Handler for Migrate module (patch)
nerdcore’s picture

The patch in #4 works like a charm! Thanks becw!

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Would be great to see this be brought into this module and also documented with the Migration module so that others know where it exists.

jonathan_hunt’s picture

Works for me also. Please commit.

cweagans’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

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

philsward’s picture

Might want to add a page or system error that specifies you need the dependency of the migrate module in order to make this work.

Without the migrate module, I received this error on the CCK content migrate page:

Fatal error: Class 'MigrateSimpleFieldHandler' not found in /home/user/public_html/sites/all/modules/contrib/phone/ on line 34

Unless I am completely missing something, I thought the CCK field migrate was the "proper" method for upgrading from D6 -> D7... This is the first time I've run into a field module needing the migrate module in order to upgrade.

philsward’s picture

If you get the error I posted in #11, you can add the following to to bypass it:

class MigrateSimpleFieldHandler {};
class MigratePhoneFieldHandler extends MigrateSimpleFieldHandler {

  public function __construct() {


put class MigrateSimpleFieldHandler {}; above the class MigratePhoneFieldHandler extends MigrateSimpleFieldHandler line.

I don't know the first thing about programming and tried that on a hunch. I personally added this line after installing the Migrate module and migrating my phone fields. After I uninstalled the Migrate module, the error came back and I needed a way to access the /admin/structure/content_migrate page. The above code let me bypass it with no problems.

DarrellDuane’s picture

Category: feature » bug
Status: Closed (fixed) » Active

I received

Fatal error: Class 'MigrateSimpleFieldHandler' not found in sites/all/modules/phone/ on line 34

in the latest version of the code as well when I went to
The class MigrateSimpleFieldHandler is defined in the Migrate module, which wasn't enabled (or required to be enabled for the Content Migrate module.

$ grep -r 'class MigrateSimpleFieldHandler' *
modules/migrate/plugins/destinations/ class MigrateSimpleFieldHandler extends MigrateFieldHandler {

There are a few options here that I see:
- We can submit a new bug report to the content_migrate module and ask them to require the migrate module be enabled.
- We can add code that defines the MigrateSimpleFieldHander class if its not defined.
-We can use a different class to support this

The first seems like a best option but I don't know if content_migrate people would be willing to do this. I'll submit a quick feature request seeing if they would.
Here is the issue for content_migrate:

arianek’s picture

Same issue as comments 11-13 - I used the instruction in comment 12 and it seems to have resolved things.