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)

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
How to get the county data shown in the list?--SOLVED
November 10, 2011, 12:15:04 pm
I am stuck on getting the county data shown in the selection list.

The steps I took so far:

1. go to the Administer -> Configure -> Global Settings -> Address settings to enable the county field
2. add a county field into the organization profile, set all contacts fields to "work" type

But when I go the profile page to add a new org, nothing shown in county drop down list. I actually had the sample data loaded in the database and I checked, these counties are in the county table.


Can anybody please tell me what's wrong here?

Thank you!
« Last Edit: March 12, 2012, 10:25:41 am by ouyang1512 »

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?
November 17, 2011, 02:02:02 am
This looks like a bug, please file an issue in jira  for this.

Thanks
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?
December 01, 2011, 07:47:17 am
Thanks for your response. I reported this issue here:
http://issues.civicrm.org/jira/browse/CRM-9252

hintbw

  • I’m new here
  • *
  • Posts: 20
  • Karma: 1
    • AzTEA
Re: How to get the county data shown in the list?
December 12, 2011, 11:11:23 pm
The issue may be related to whether you have a Country field for the address type (Home, Work, etc) included in your profile. The county field will not auto-populate unless the Country field has been included on the profile for the appropriate address type. You can see the bug identified at http://issues.civicrm.org/jira/browse/CRM-7993.
---
Brett

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?
December 15, 2011, 11:10:51 am
I did have the country field enabled in my profiles. I have United States and Canada in country field options, and US is default. The interesting thing is, if I used the default (US), the states data populate correctly, but if I switch to Canada or simply click "-Select-", nothing show up (which is understandable-I may not have states data of Canada in my DB), then I reselect United States in country field as my option, the states field has no data shown up. It is all blank as the county (not country) field, not working any more. I have to refresh the page to get the states data back. Anyone had/are having such problem or know I miss anything?

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?
December 15, 2011, 11:16:51 pm
Quote
The interesting thing is, if I used the default (US), the states data populate correctly, but if I switch to Canada or simply click "-Select-", nothing show up (which is understandable-I may not have states data of Canada in my DB), then I reselect United States in country field as my option, the states field has no data shown up. It is all blank as the county (not country) field, not working any more. I have to refresh the page to get the states data back. Anyone had/are having such problem or know I miss anything?

Can you try to replicate this issue on http://drupal.sandbox.civicrm.org

Thanks
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?
December 16, 2011, 09:20:52 am
I have tried and the demo worked very well. I went to look at the log report in drupal, here are the error messages, can anybody help me figure out what's wrong? In case you need to know, my drupal database tables have prefix (cmdr7), and drupal db and civicrm db are separate, and the databases are named like this: sitename_drupal, sitename_civicrm. Thank you!

log 1:
Code: [Select]
Location http://host/sitename/index.php?q=civicrm/ajax/jqCounty&_id=address_1_state_province_id&_name=address%5B1%5D%5Bstate_province_id%5D&_value=null
Referrer http://host/sitename/index.php?q=civicrm/contact/add&reset=1&action=update&cid=102
Message $Fatal Error Details = Array ( [message] => One of parameters (value: null) is not of the type Integer [code] => )

log 2:
Code: [Select]
Location http://host/sitename/index.php?q=civicrm/ajax/jqCounty&_id=address_1_state_province_id&_name=address%5B1%5D%5Bstate_province_id%5D&_value=null
Referrer http://host/sitename/?q=admin%2Freports%2Fevent%2F19609&render=overlay
Message $backTrace = /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 303
                  /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Utils/Type.php, fatal, 282
                  /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/DAO.php, validate, 933
                 /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/DAO.php, composeQuery, 870
                /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php, executeQuery, 1545
                /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/Page/AJAX/Location.php, countyForState, 242 , jqCounty,
                /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/CRM/Core/Invoke.php, call_user_func, 191
                 /usr/local/apache2/htdocs/sitename/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 447 , civicrm_invoke,
                /usr/local/apache2/htdocs/sitename/includes/menu.inc, call_user_func_array, 503
                /usr/local/apache2/htdocs/sitename/index.php, menu_execute_active_handler, 21

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?
December 20, 2011, 10:20:18 pm
Hi,

Very new to civi and was wondering if there has been an progress in fixing the issue since I'm having the same one?

Counties are not being pulled. State is set ahead of County and Country is active also. This is on both the front and back end of the site.

Thank you

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?
December 20, 2011, 10:36:03 pm
JulesM,

You will have to add counties manually ( sql ) for Michigan in civicrm_country table. Then it will work fine. Note that also in profile country, state and county should be of same location type.

HTh
Kurund
Found this reply helpful? Support CiviCRM

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?
December 20, 2011, 10:56:07 pm
Hi,

Thank you for the speedy reply.

Since I know virtually nothing about civi or getting the data tables sorted I went ahead and extracted the gzip I found here:
/administrator/components/com_civicrm/civicrm/sql/counties.US.sql.gz

Attached is what my database table look like right now

I also went and changed both the Mailing Labels and Address Display in Global Settings>>>Address Settings to:
{contact.address_name}
{contact.street_address}
{contact.supplemental_address_1}
{contact.supplemental_address_2}
{contact.city}{, }{county}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}

I'm not sure how fa I'm off base so any help at this point is really appreciated.

Thanks again



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?
December 20, 2011, 11:16:56 pm
Sorry forgot to mention that country, state and county are all set  Contacts/Home

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?
December 20, 2011, 11:43:15 pm
Looks like state - country feature is broken in 3.4.x for profile, but is working fine in 4.1 release, so may be upgrade when 4.1 goes beta or stable.

Kurund
« Last Edit: December 20, 2011, 11:58:01 pm by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

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?
December 21, 2011, 09:01:27 am
Can 4.1 run on Joomla 1.5.25? Or would I have to upgrade the Joomla installation also?

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?
December 21, 2011, 11:08:51 am
Quote
Can 4.1 run on Joomla 1.5.25? Or would I have to upgrade the Joomla installation also?
CiviCRM v4.1 needs joomla 1.6 or 1.7

Kurund
Found this reply helpful? Support CiviCRM

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?
December 21, 2011, 11:43:32 am
Okie dokie. Thank you so much for your prompt replies. I'll be yanking Joomla 1.5.25 and giving 1.6 a run for its money then. Hopefully civi 4.1 will do what we need.

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.