Score:0

Commerceguys/addressing missing locality in for some countries

om flag

I spent the weekend digging into this one. Pretty sure that the issue is a bug (or missing data) from https://github.com/commerceguys/addressing

I've installed a clean version of Drupal 9.3.6 Installed address module 8.x-1.10 Commerceguys/addressing v1.2.2

Added "address" as a field to a new (and only node).

Some countries display locality (e.g., state/province) others don't. I've filed a report in the issue queue (here), but wondering if anyone has encountered this and if so if there is a workaround.

enter image description here

Score:3
cn flag

The Address module uses the Addressing library to display localities.

After installing the Address module, you can find the actual locality data here:

/vendor/commerceguys/addressing/resources/subdivision/COUNTRY-CODE.json

Where COUNTRY-CODE is the two-letter ISO code for that country.

As for 2-2022, Italy (IT) has data, but France (FR) does not.

You can easily create data for additional countries yourself. All you need to do is use one of the existing files as an example and get a list of ISO codes for the localities in question. Then you can add your JSON data as a PR to the addressing repo and hopefully it can get included for everyone.

sea26.2 avatar
om flag
Thank you Patrick. You confirmed my suspicions and provided the best possible solution.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.