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.
At the top of addressfield.inc, it would be helpful if it stated that the ISO country code is needed in upper case.
I found that from my testing, when the ISO code is in lower case, e.g. 'us', then the AddressField country field is not set correctly.
When $row->country is 'US', then the following code works and the AddressField country is set correctly.
// The country should be passed in as the primary value.
$this->addFieldMapping('field_event_location', 'country')
->arguments($arguments);
Comment | File | Size | Author |
---|---|---|---|
#1 | migrate_extras-addressfield-country-code-uppercase-1971528-1.patch | 2.73 KB | michaellenahan |
Comments
Comment #1
michaellenahan CreditAttribution: michaellenahan commentedHere's the patch.
Comment #1.0
michaellenahan CreditAttribution: michaellenahan commentedexplanation of where in the code the country code value is used.