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) »
  • Not Saving County Data
Pages: [1] 2

Author Topic: Not Saving County Data  (Read 3630 times)

radiofreetexas

  • Guest
Not Saving County Data
March 04, 2010, 08:20:09 am
Howdy! I'm having an issue that I cannot figure out. I imported a list of Texas counties into the appropriate table. When we add/edit a contact the drop down appears with the correct list. It will allow us to choose a county and save. However, it does not save the county. This is the only field that it won't save and happens to be one of the most important for us. Any ideas where I can look? Thanks!

DM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Not Saving County Data
March 04, 2010, 10:37:39 am
Can you reproduce on demo to see if it's a bug. Enable Country field first from Administer >> Configure >> Global Settings >> Address Settings.
Protect your investment in CiviCRM by  becoming a Member!

radiofreetexas

  • Guest
Re: Not Saving County Data
March 04, 2010, 10:43:39 am
Tested it out on the demo. Worked fine. Very strange.

radiofreetexas

  • Guest
Re: Not Saving County Data
March 04, 2010, 10:50:20 am
Update:

If I edit the contact in the CiviCRM backend and select the county, it will save it there. Just not on the front end.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Not Saving County Data
March 04, 2010, 11:43:04 am
I assume by front-end you mean in a Profile which has the County field included. Right? Again ... please recreate on our public demo. I think you can update the sample Name and Address profile - I've updated the demo already to expose it front-end (using Menu Manager)...

http://joomla.demo.civicrm.org/index.php?option=com_civicrm&view=Profiles&Itemid=7
Protect your investment in CiviCRM by  becoming a Member!

radiofreetexas

  • Guest
Re: Not Saving County Data
March 04, 2010, 11:53:12 am
Thanks for opening that up. Definitely was able to reproduce it on the demo. Editing from the frontend will not save the county.

radiofreetexas

  • Guest
Re: Not Saving County Data
March 06, 2010, 09:39:01 am
Should I kick this up to the development team?

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: Not Saving County Data
March 06, 2010, 02:19:36 pm

can you give us the specific steps to reproduce on demo

if this issue is important to you, consider investigating and filing a patch to fix it

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

radiofreetexas

  • Guest
Re: Not Saving County Data
March 06, 2010, 03:54:12 pm
Sure thing. Here's how it happens.

1) I enable County in the Global Settings.
2) I add County to the Name and Address profile.
3) I make it required.
4) From the Joomla front-end, I edit any contact. The County field appears and is required. The counties in the table are in the drop down list. I fill in all of the information including selecting a county. I submit. It thanks me and shows me the contact info, however County is blank.
5) If I edit the contact again, all of the info is there from the previous entry except for County.
6) If I search for and select that contact from the backend the county field is there but the field is empty. I can select a County and save it from the backend and it will save.

It seems to be a problem with the frontend adding/editing a contact only with Joomla.

I would endeavor to construct a patch for this but my programming skills are VERY limited and I don't even know where to start to attempt to fix this problem. Hence, I'm looking for a little direction from someone who knows the code a little better. Thanks.

DM

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: Not Saving County Data
March 06, 2010, 08:14:14 pm

please file an issue at http://issues.civicrm.org/

we'll fix this for 3.2

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

WeChewie

  • Guest
Re: Not Saving County Data
March 26, 2010, 03:49:19 am
I just encountered this issue also.

I imported several thousand records and the "County" field was recognized by the Import Wizard, and listed as an option during the import. I chose to have "County" data imported. The import completed successfully (I thought) but the county data is not showing up for any of the records that I imported.

One thing I noticed is that the "County" field appears to be a conditional dropdown in the data entry UI, even though "City" and "Zip Code" are free text fields. It's probably not a good idea to have "County" be a conditional dropdown, because people may misspell or incorrectly enter the city or zip code data. Also, what if the city database embedded within CiviCRM is out of date?

Another thing I noticed about the data displaying in the "County" dropdown is that it is incorrect, and is displaying counties from a state other than the one in the contact record.

I'm not sure if you are aware, but "County" is an important field for political organizations here in the US, and you are probably going to get more feedback on this issue as people upgrade to versions of CiviCRM that have this bug. I don't know what the timing is on version 3.2, but if this turns out to be just a display issue, a patch might be more desirable.

WeChewie

  • Guest
Re: Not Saving County Data
March 26, 2010, 05:09:43 am
Quote from: WeChewie on March 26, 2010, 03:49:19 am
I just encountered this issue also.

I imported several thousand records and the "County" field was recognized by the Import Wizard, and listed as an option during the import. I chose to have "County" data imported. The import completed successfully (I thought) but the county data is not showing up for any of the records that I imported.

One thing I noticed is that the "County" field appears to be a conditional dropdown in the data entry UI, even though "City" and "Zip Code" are free text fields. It's probably not a good idea to have "County" be a conditional dropdown, because people may misspell or incorrectly enter the city or zip code data. Also, what if the city database embedded within CiviCRM is out of date?

Another thing I noticed about the data displaying in the "County" dropdown is that it is incorrect, and is displaying counties from a state other than the one in the contact record.

I'm not sure if you are aware, but "County" is an important field for political organizations here in the US, and you are probably going to get more feedback on this issue as people upgrade to versions of CiviCRM that have this bug. I don't know what the timing is on version 3.2, but if this turns out to be just a display issue, a patch might be more desirable.

I just took a look in the database, and none of my county data was imported even though the Import wizard indicated the import had completed successfully without errors.

I am running 3.1.3, and my civicrm_county table only has 6 rows in it (which explains why the same six counties show up on every data entry screen in the dropdown)

But what concerns me is the design of the address management component of CiviCRM... from looking at the data structure, "County" is not actually stored in the civicrm_address table, instead there is civicrm_address.county_id which is a foreign key to the civicrm_county table (which has only 6 rows in it).

In addition to the obvious performance implications of having to do an extra join every time an address with a county needs to be displayed, I feel it doesn't make sense for "County" to be a lookup value. There are probably thousands of counties in the US alone, the number of counties in the entire world is probably more than 100,000. Even assuming you could get a list of every county in the world, how would you keep that list up to date? What about when people mis-type or mis-enter data? What is the purpose of an external reference to county data when city and zip code are free form?

It seems that whoever was implementing this feature may have encountered these issues, which is why there are only 6 rows in the civicrm_county table. I would like to propose that "County" be converted to be just a standard free form text field like "City", with the actual value stored in the civicrm_address table.

What do people think?

WeChewie

  • Guest
Re: Not Saving County Data
March 26, 2010, 05:22:56 am
Quote from: Donald Lobo on March 06, 2010, 08:14:14 pm

please file an issue at http://issues.civicrm.org/

we'll fix this for 3.2

lobo


Hi Donald, I just took a look at the issues related to query string "county" at that site, and didn't see a recent issue opened. If necessary, I can open one, but if there is an issue related to this thread, can you please tell me the issue number so I can monitor it and also add my comments in?

I did find a lot of old issues related to county - it looks like a fair bit of effort has been spent dealing with the current implementation - turning it into a free text field as described in my earlier posts might simplify things considerably as well as provide a slight performance benefit...

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: Not Saving County Data
March 26, 2010, 08:28:02 am

the person might have not filed an issue. please go ahead and file an issue. If this is important to you consider filing a patch.

For 3.2 we are out of time to consider making it a text box (its also a schema change). In general getting consistent data is probably a better idea than free form data, IMO

Our county support is fairly minimal. Would be great for someone to step up and write code to improve it and/or sponsor a developer to do so

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

WeChewie

  • Guest
Re: Not Saving County Data
March 26, 2010, 09:02:56 am
Quote from: Donald Lobo on March 26, 2010, 08:28:02 am

the person might have not filed an issue. please go ahead and file an issue. If this is important to you consider filing a patch.

For 3.2 we are out of time to consider making it a text box (its also a schema change). In general getting consistent data is probably a better idea than free form data, IMO

Our county support is fairly minimal. Would be great for someone to step up and write code to improve it and/or sponsor a developer to do so

lobo


Hi Donald,

I will file an issue. I think it really should be a text box - you say that "getting consistent data is probably a better idea"; while I agree with you in theory, the reality is that right now CiviCRM ships without any County data except for six counties in California making the County functionality unusable for all intents and purposes. In addition, the Import wizard is currently providing misleading information as to the state of attempted imports of data into the County field. The guy who originally started this thread also had an issue with it

Turning it into a text box might be a little painful in the short term but the benefits over the long run in terms of performance and reduced development and testing, as well as the benefit of giving users a working County field inside the Address object ,make it worthwhile IMHO.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Not Saving County Data

This forum was archived on 2017-11-26.