How could a CiviCRM database have 2 Marylands with 2 different state_province_codes but both be identified with the same country_code?

1019 = Maryland 3497 = Maryland 1228 = United States

I only was alerted to this when my newly inherited client created a Smart Group to display all records with postal_code between 20601 and 21930.

Is my CiviCRM instance corrupt or has a bad import caused this? Can I manually adjust the offending records without cascading problems? How would you suggest a fix for this?

2 Answers 2


It sounds like you're not using the latest version of CiviCRM (4.7.30 at the time of writing). It sounds like you're experiencing the bug that was described and fixed at CRM-19888. It's also related to this much older bug.

Please upgrade to 4.7.30 and try again?


I may not have quite understood you but if you have access to your database you can look in civicrm_state_province where you will see there is a Maryland MY in Liberia (1122) as well as a Maryland MD in the USA (1228)

enter image description here

When importing contacts with State/Province you may be better off if you either import the abbreviation (though even that might not be unique) or also import Country.

  • I can see in the database: 1019 - Maryland - 1228. Yet, during someone's import the database decided on its own to assign over 600 records this: 3497 - Maryland - 1228 Thanks for sharing how this might have occurred.
    – fndtn357
    Commented Feb 9, 2018 at 22:40
  • nw. i edited the Title/Question to try and better reflect the issue
    – petednz - fuzion
    Commented Feb 10, 2018 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.