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.
I'd really like to use phone fields stored with addresses. But I am migrating a site from D6 -> D7 and there doesn't appear to be a way to take phone numbers in D6 CCK fields and data field addressfield_phone adds to the field_address table. It would appear that this module would need to add subfields to the table, ie, field_address:phone, field_address:phone_ext, field_address:mobile, field_address:fax, and then provide an address_phone.inc to map the subfields.
Comment | File | Size | Author |
---|---|---|---|
#6 | add_migration_capability-2016325-6.patch | 2.11 KB | annya |
#4 | addressfield_phone-add_migration_capability-2016325-4.patch | 2.78 KB | z3cka |
Comments
Comment #1
xatoo CreditAttribution: xatoo commentedTake a look at this patch for the Addressfield module: #2013543-2: Better Migrate support and if it works for you, please report back there.
Comment #2
z3cka CreditAttribution: z3cka commentedI could be wrong, but I think since this module statically defines a phone number, the migrate api requires that this module maintain compatibility with migrate.
That said, I applied the patch to addressfield from comment #1 and while the subfields showed up for the address, it did not pick up the phone fields from address_phone module :-(.
So, I wrote a patch! But I will have to post it after the holiday weekend. I'm not sure if it is the most optimal way to get migrate support, but it works.
Comment #3
z3cka CreditAttribution: z3cka commentedHere is the patch that adds support for using the migrate api (module) with addressfield_phone field as one of your destinations for your data.
Comment #4
z3cka CreditAttribution: z3cka commentedHere is a cleaner version of the patch from #3. The previous patch had 1 unnecessary commit.
Comment #5
jcisio CreditAttribution: jcisio commentedIt is not necessary.
Why?
Look like an addressfield field will always use this handler, even addressfield_phone is not configured for that field? Could you give an example?
Debug left.
Comment #6
annya CreditAttribution: annya commentedI think z3cka's patch(#4) is great. So I decided to improve it for commit.
Removed
Removed
We need to inform migrate that our subfield handle addressfield type. Without it we will have a notice that field was used as destination field mapping but is not in list of destination fields.
Removed
Comment #7
z3cka CreditAttribution: z3cka commentedThanks @annya !!! I meant to come back a clean this up someday when I needed it; and now I don't have to because you fixed it!
Cheers!
Comment #8
jcisio CreditAttribution: jcisio commentedThanks!