CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Country & State/Province Codes/Abbreviations
Pages: [1]

Author Topic: Country & State/Province Codes/Abbreviations  (Read 5961 times)

Bill Scheurer

  • Guest
Country & State/Province Codes/Abbreviations
August 25, 2007, 09:08:46 am
We encountered a problem with the interaction between country codes/abbreviations and state/province codes/abbreviations.

We have contacts from around the world, so we enabled all the countries for the state/province lookup function. But, the results were puzzling.

For example, records with the state code/abbreviation of "OR" (for Oregon) and "US" (for United States) showed inconsistent behavior.

In the main contact view, everything looked fine -- "OR" & "US" in the right places.

But, in the edit detail view, "OR" translated into "Orhei" (apparently the name of a province -- with the "OR" abbreviation/code -- in the country of Moldova), instead of Oregon, USA.

We are using Google mapping geocode data, as we import the records, but that seems to work fine.

When we got rid of all the countries except United States & Canada for the state/province lookup function, all the records imported okay without this problem.

Since we are done with our importing (for now), we would like to go back to suppporting all countries.

However, our fear is that if we go and turn on all the other countries again, that it will trash our existing data and move all our friends in Oregon to Orhei (great frequent flier miles, though :-) !?

Does CiviCRM documentation show anywhere how it applies these rules?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Country & State/Province Codes/Abbreviations
August 25, 2007, 01:52:32 pm
Can you try to replicate this on http://demo.civicrm.org/drupal. If you are able to replicate please file an issue in jira with detail steps.

thanx

kurund
Found this reply helpful? Support CiviCRM

Bill Scheurer

  • Guest
Re: Country & State/Province Codes/Abbreviations
August 25, 2007, 02:52:09 pm
To be able to replicate this, I would need to have Admin rights on the demo server -- to set the state/province table to all countries. The server may also need to be set to Google geocoding too, since that is how our server is set. If we can replicate these conditions, I would be happy to test it with some fake data and send another happy Oregonian to vacation in beautiful Orhei :-)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Country & State/Province Codes/Abbreviations
August 25, 2007, 10:19:40 pm

The demo user has admin civicrm access. Google mapping credentials are also present on the demo system.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Bill Scheurer

  • Guest
Re: Country & State/Province Codes/Abbreviations
August 26, 2007, 12:57:33 pm
thanks! aloha, orhei ...

sjthespian

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 3
    • The League of Professional System Administrators
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Country & State/Province Codes/Abbreviations
November 20, 2010, 04:49:36 pm
I hate waking up an old thread, but I am seeing this exact behaviour on a new 3.2 installation.  We have users registering for memberships that show fine as long as we look at the abbreviation but have the wrong value when we look at the long name (I found this out developing a custom report for mailings).

For example, I have a user from Idaho in the United States who is showing up as being from Boise, Idlib.  When I check the database he has a state_province_id of 4605 which is Idlib, but has an abbreviation of ID - the same as Idaho.  I have a hunch that the code that populates this when a user registers is searching by abbreviation but not limiting it to the country the user specifies.

I am on vacation this week so can't dig into the code too deeply, but when I get home on the 29th  I will see if I can reproduce this on the demo system and/or find the bit of offending code that is causing the problem.
Dan Rich <drich@lopsa.org>
    Director, LOPSA - http://lopsa.org/

pst_manly

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: 6.19
  • MySQL version: 5.0.45
  • PHP version: 5.2.13
Re: Country & State/Province Codes/Abbreviations
February 28, 2011, 06:21:41 am
*bumping*

I encountered this today, is there a workaround on this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Country & State/Province Codes/Abbreviations
February 28, 2011, 07:46:30 am

there was a bug in the import script which caused the mismatch. We've fixed this for 3.4

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Country & State/Province Codes/Abbreviations

This forum was archived on 2017-11-26.