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 Import (Moderator: Yashodha Chaku) »
  • Possible bug: blank "country" column in CSV results in RANDOM country assignment
Pages: [1]

Author Topic: Possible bug: blank "country" column in CSV results in RANDOM country assignment  (Read 1860 times)

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 09, 2010, 11:55:44 pm
I don't know how else to put this.

For some bizarre reason, if the data for any row in the "country" column is empty, CiviCRM gets creative, and assigns a totally random country to the imported record.

Anybody else ever experience this strange behavior?

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: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 10, 2010, 05:57:30 am

Can you reproduce this on the demo server and attach the csv file

thanx

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

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 11, 2010, 10:44:51 pm
Lobo,

No I can not try this on the demo site.  This is a real database with over 2000 actual individuals and their personal information.

What happened to me is as I described it -- and it was scary.  Has anybody else experienced this?

I have since updated the data so that "United States" is in every blank record, but I don't feel this should be necessary to avoid CiviCRM creatively choosing a country at random for me.

If it happens again, I will take a screen shot.

Richard

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: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 12, 2010, 08:26:27 am

in general when we ask folks to reproduce on the demo db, we mean

a. reproduce with just  a small part of your data file (1-10 records)

b. modify the data to not disclose any personal information

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

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 12, 2010, 06:41:42 pm
lobo,

ok, I have tried to upload data to the demo site. HOWEVER, when I try to do so, I am told that most (17 out of 20) of my records have invalid data for STATE!

I am attaching my csv here.

I can not see what could be wrong with my data!

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 12, 2010, 06:48:15 pm
lobo,

In addition, here is a screen shot from my installation, after importing.

Most of these records had BLANK country fields (all except the last one, which is United States).

And it seems like CiviCRM chose a country based on the STATE field!

GA = SOMALIA
NY = HUNGARY

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 13, 2010, 09:47:40 am
Lobo,

You know what I think might be causing this?  It might be the fact that, under "localization", I have chosen EVERY country, and EVERY possible state within them.

I believe this slows the import considerably, and can lead to weirdness -- would you agree?

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: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 13, 2010, 10:58:07 am

you might want to experiment with having all countries / states and having just a subset of them and seeing how it impacts the import

if you can check and figure out how to optimize the import to make the import faster with the entire list of countries/states that would be awesome

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

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 15, 2010, 10:11:04 pm
Hi Lobo,

Yeah, that would be awesome!  But, our organization only has members in the US, Canada, and the UK, so for now I am sticking with those.

Still having some troubles, but I am troubleshooting and hopefully will have more info soon.

Will you be at DrupalCon?

Bix

bixgomez

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 15, 2010, 10:54:51 pm
Lobo,

All seems well now.  Could have been a number of things...

Could have been something corrupt in my old data (I re-exported from Access, making sure I chose UTF-8, which is not the default). 
Could have had something to do with the countries -- I have now only chosen the few countries that are actually represented in my data.
Could even be improvements in CiviCRM 3.1.4 -- I just upgraded tonight!

And no more random countries being mapped erroneously from the State field -- that was super weird.  Now, the blanks are defaulting, as they should to "United States", and the rest are falling into place nicely.

Anyway, I am off and running it seems -- so pleased!

Thanks for lending an ear, and advice, through my crisis...

Guy Iaccarino

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 5
    • Greenleaf Advancement
  • CiviCRM version: 4.4.10, 4.5.4
  • CMS version: WordPress 4, Drupal 7, Drupal 6, Joomla 3
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Possible bug: blank "country" column in CSV results in RANDOM country assignment
April 27, 2010, 06:31:57 pm
I had experienced the "random country" issue as well, and so I re-imported the contacts with United States. It went away though and I've imported contacts with blank country fields since, and had no issue.
Guy Iaccarino
www.greenleafadvancement.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Possible bug: blank "country" column in CSV results in RANDOM country assignment

This forum was archived on 2017-11-26.