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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to get the county data shown in the list?--SOLVED
Pages: 1 [2]

Author Topic: How to get the county data shown in the list?--SOLVED  (Read 4894 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: How to get the county data shown in the list?
February 04, 2012, 08:27:15 am
I am working on a 3.4.8 installation.  It is true that 'county' select doesn't work properly in 3.4.8, and there is a communications disconnect between the users and the administrators on this issue.  Let me clear this up.

Let me show you how I have found a workaround for this issue.  If you follow these instructions you should be able to get county working in 3.4.8 and not have to wait to upgrade to 4.1.

Editing A Contact
In order for 'county' to work in a 'edit this contact' administrative context such as:
http://<<your-site>>/civicrm/contact/add?reset=1&context=search&action=update&cid=7

You must have all three address fields enabled, 'country', 'state', and 'county' here:
http://<<your-site>>/civicrm/admin/setting/preferences/address?reset=1

Note: It is not necessary for you to make all countries available, a single country such as "United States" only will suffice, so long as the field is present.

Using County in a Profile
In order for 'county' to work in a 'profile' context such as:
http://<<your-site>>/civicrm/profile/create?gid=32&reset=1 (or as an included profile on a registration or contribution page)

You must:
* have all three address fields listed in the profile: 'country', 'state', and 'county'
* AND all three of these fields must be the same address such as "home", or "work" etc.
* AND Country must be before State
* AND State must be before County

Note: It is not necessary for you to make all countries available, a single country such as "United States" only will suffice, so long as the field is present.

I realize that if all your constituents are in a single country it may seem odd/unnecessary to be forced to list country, but this is a quirk of the software in this 3.4 version.

« Last Edit: February 04, 2012, 08:45:47 am by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: How to get the county data shown in the list?
February 05, 2012, 11:08:56 pm
Stoob,

I think this is fixed in 4.1, but not sure under which issue etc. Can you check if your drupal log for errors.

Kurund
Found this reply helpful? Support CiviCRM

ouyang1512

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.12
  • MySQL version: MySQL 5.1.52
  • PHP version: 5.3.6
Re: How to get the county data shown in the list?
March 07, 2012, 12:45:23 pm
I still cannot get the county data shown on the drop down list after I upgraded to 4.1.1. There are two errors shown in firebug (please see the attachment).

And I also have two log messages in drupal log report:
Quote
Notice: Undefined property: CRM_Core_DAO::$city in civicrm_api3_contact_quicksearch() (line 766 of /usr/local/apache2/htdocs/citymatch_drupal7/sites/all/modules/civicrm/api/v3/Contact.php).

Quote
Notice: Undefined property: CRM_Core_DAO::$ste.name as state_province in civicrm_api3_contact_quicksearch() (line 766 of /usr/local/apache2/htdocs/citymatch_drupal7/sites/all/modules/civicrm/api/v3/Contact.php).
on http://sitename/index.php?q=civicrm/ajax/rest&className=CRM_Contact_Page_AJAX&fnName=getContactList&json=1&context=contact&org=1&id=108&employee_id=102

I am not an experienced developer. Can anybody here adise me on how to fix this issue? Greatly appreciated!

JulesM

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
    • Michigan Rising
  • CiviCRM version: 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.0.95-community
  • PHP version: 5.3.8
Re: How to get the county data shown in the list?
March 07, 2012, 01:19:44 pm
Did you grab the counties.US.sql.gz out of the zip file and load the counties in your database?

That got me for the first while and of course, if you don't do that there will be no data to pull into the county field.

ouyang1512

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.12
  • MySQL version: MySQL 5.1.52
  • PHP version: 5.3.6
Re: How to get the county data shown in the list?
March 07, 2012, 01:42:56 pm
Thanks for your reply!
I actually loaded the sample county data in the database. I just checked the counties in CA are in the county table, but for some reason, they just do not show. I am very frustrated and has been struggling on this issue for a long time. Any help are greatly appreciated!

ouyang1512

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.12
  • MySQL version: MySQL 5.1.52
  • PHP version: 5.3.6
Re: How to get the county data shown in the list?
March 12, 2012, 10:24:47 am
OK, I finally figured this out :D :D.
This turned out to be a html issue. I had "display memory usage" enabled in Drupal's devel settings which comes with development module. The memory usage messages display at the end of the page. I have no idea how the js calls are mixed with the memory usage messages' css, but when this function is enabled, the css for displaying the memory usage messages containing word "class" which is reserved for js. After I unchecked the "display memory usage" option, everything works like a charm, which include county data, contact's activity data, and dashboard!
For those of you who are experiencing similar problems, you may check with your devel settings in drupal, or check if any html containing some words which are not work with js. Please forgive my bad English. I am sure there are many much more knowledgable people can help explain this issue.

Thanks everybody for the help!!!
« Last Edit: March 12, 2012, 10:28:04 am by ouyang1512 »

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to get the county data shown in the list?--SOLVED

This forum was archived on 2017-11-26.