Problem/Motivation

When selecting Andorra (AD) as the country in an Address field, the values that correspond to administrative divisions (states) are being placed in the locality (City) field, while the administrative_area (State/Province) field is removed entirely. This results in address data being stored in the wrong components.

Steps to reproduce

  • Install and enable the Address / addressfield module.
  • Create a field of type Address.
  • Use the default widget and formatter.
  • Create or edit an entity with this address field.
  • Select Andorra as the country.

Expected result

Administrative division values (e.g. Andorran parishes such as Andorra la Vella, Escaldes-Engordany, etc.) should be stored and exposed in the administrative_area component.

Actual result

When Andorra is selected:

  • The administrative_area field is removed from the form.
  • Administrative values appear to be mapped into the locality field instead.

Comments

rokkun88 created an issue. See original summary.

bojanz’s picture

Category: Bug report » Support request

The Universal Postal Union says these are localities, not administrative areas: https://www.upu.int/UPU/media/upu/PostalEntitiesFiles/addressingUnit/and...

Google is following the Universal Postal Union recommendation (they made the dataset we are using).

If I find a place on Google Maps like this one:
https://www.google.com/maps/place/Hotel+Bonavida/@42.5665747,1.5968839,17z/data=!4m12!1m2!2m1!1sHotels!3m8!1s0x12af62270f4ee2ff:0x73dccb062829611c!5m2!4m1!1i2!8m2!3d42.5665671!4d1.6001932!16s%2Fg%2F11xlqtmxp?entry=ttu&g_ep=EgoyMDI2MDEyNy4wIKXMDSoASAFQAw%3D%3D
and then use the Google Maps API to get a structured address, it gives me:

    "postalAddress": {
        "regionCode": "AD",
        "languageCode": "en-US",
        "postalCode": "AD100",
        "locality": "Canillo",
        "addressLines": [
          "Carrer Peu del Carrer"
        ]
      }