Page MenuHomePhabricator

International addresses not displaying and/or saving correctly
Closed, DeclinedPublic

Description

From Molly:

Dear Arthur,
I am entering a donation from Austria and the address is not showing up properly. The state is not showing up. The address is adding the #9. Please see this record. https://civicrm.wikimedia.org/civicrm/contact/view?reset=1&cid=509214

-Molly


Version: wmf-deployment
Severity: normal

Details

Reference
bz24830

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:59 PM
bzimport set Reference to bz24830.

There is a problem with data for states in SOME countries in the Civi database. For an undetermined number of countries, state abbreviations are stored in the database as digits rather than actual abbreviations, hence the odd display of some international addresses (like those for Austria).

I made a temporary fix in Civi where Civi is set to display full state names rather than abbreviations. This is kind of a lame fix because there are places in Civi where ONLY abbreviations are displayed.

I'm looking into an actual solution to the problem.

Where does this state data come from? Is it supplied with Civi or did we put it in ourselves at some point?

(In reply to comment #2)

Where does this state data come from? Is it supplied with Civi or did we put it
in ourselves at some point?

18:29 < awjr> dlobo: any idea where the state information for countries originally came from?
18:29 < awjr> and btw, there are 47 affected countries
18:29 < dlobo> awjr: some iso spec
18:29 < dlobo> iso-3166 i think
18:29 < dlobo> piotr will know the exact details

47 Countries are affected:

mysql> select s.country_id, c.name from civicrm_state_province s, civicrm_country c where c.id = s.country_id and s.abbreviation rlike '[0-9]' group by s.country_id;
+------------+--------------------------------------+

country_idname

+------------+--------------------------------------+

1003Algeria
1014Austria
1016Bahrain
1017Bangladesh
1024Bhutan
1033Bulgaria
1035Myanmar
1037Cambodia
1045China
1051Congo
1054C�te d'Ivoire
1055Croatia
1056Cuba
1057Cyprus
1059Denmark
1062Dominican Republic
1069Estonia
1076France
1085Greece
1100Iceland
1103Iran, Islamic Republic of
1109Japan
1112Kenya
1115Korea, Republic of
1131Malaysia
1132Maldives
1133Mali
1137Mauritania
1144Mongolia
1156Niger
1161Norway
1166Panama
1168Paraguay
1173Portugal
1187Saudi Arabia
1193Slovenia
1199Sri Lanka
1200Sudan
1210Tanzania, United Republic of
1211Thailand
1218Tunisia
1219Turkey
1223Uganda
1224Ukraine
1227United States Minor Outlying Islands
1233Viet Nam
1239Zambia

+------------+--------------------------------------+
47 rows in set (0.01 sec)

Tried making direct contact with Piotr (the guy who presumably handled getting country info into the db) with no luck, posted on Civi forums to get more info about how they generated the info originally and how I might go about fixing this:

http://forum.civicrm.org/index.php/topic,15431.new.html

We've found an interim solution for this problem and have reported this issue to the CiviCRM community multiple times now. Since we have a workaround for this in place and we do not have the bandwidth to fix the third party product, I'm marking as wontfix. Hopefully this will be fully resolved in a future release of CiviCRM.

[Moving from "CiviCRM/General" to "Wikimedia/CiviCRM; see bug 57738]