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 (Moderator: Dave Greenberg) »
  • Saving Contact drops City and Postal Code
Pages: [1]

Author Topic: Saving Contact drops City and Postal Code  (Read 429 times)

ericross

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • civiadmin
    • National Day of Prayer New York
  • CiviCRM version: 4.6.2
  • CMS version: WordPress 4.1.1
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.4.38
Saving Contact drops City and Postal Code
October 08, 2014, 12:04:09 pm

Almost immediately after pressing Save on a new or edit contact record, the City and Postal Code values are NULL. Any idea where to look??


CRM_Core_DAO: QUERY: UPDATE civicrm_address SET is_primary = 0 WHERE contact_id = 3404 AND id <> 2695CRM_Core_DAO: query: QUERY DONE IN 0.00144004821777 secondsCRM_Core_DAO: 1: Clearing Cache for crm_core_daoCRM_Core_DAO_Address: 3: got keys as a:1:{i:0;s:2:"id";}CRM_Core_DAO_Address: QUERY: UPDATE civicrm_address SET contact_id = 3404 , location_type_id = 1 , is_primary = 1 , is_billing = 1 , street_address = NULL , street_number = 1234 , street_number_suffix = NULL , street_name = NULL , street_unit = NULL , supplemental_address_1 = NULL , supplemental_address_2 = NULL , city = NULL , county_id = 2011 , state_province_id = 1031 , postal_code_suffix = NULL , postal_code = NULL , country_id = 1228 , geo_code_1 = 37.09024 , geo_code_2 = -95.712891 , manual_geo_code = 0 , name = 'test address3' , master_id = NULL WHERE ( civicrm_address.id = 2695 ) CRM_Core_DAO_Address: query: QUERY DONE IN 0.00103402137756 secondsCRM_Core_DAO_Address: 1: Clearing Cache for crm_core_dao_addressCRM_Core_DAO_Address: 1: Clearing Cache for crm_core_dao_addressCRM_Core_DAO_Cache: CONNECT: Checking for database specific ini ('') : database_ in optionsCRM_Core_DAO_Cache: QUERY: SET NAMES utf8CRM_Core_DAO_Cache: query: QUERY DONE IN 0.000294923782349 secondsCRM_Core_DAO_Cache: find: 1CRM_Core_DAO_Cache: QUERY: SELECT *
FROM civicrm_cache

WHERE ( civicrm_cache.group_name = 'contact fields' ) AND ( civicrm_cache.path = 'custom importableFields Address_0_0_0_1__0__0__1_6a657c34' )




City and Postal Code information in the civicrm_address table does pull into the Contact record but is overwritten by NULL on save.



FYI: We did a customization to the Contact record adding County to the Address record long ago. See the screenshot. That information pick list and the data is fine.


My recent upgrade hasn't helped.
[size=78%]  WordPress 4.0[/size]
[/size]
  CiviCRM 4.4.7[/font]
Usability Matters.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Saving Contact drops City and Postal Code
October 09, 2014, 12:42:33 am
Hey there,

What version are you on now exactly? I would say this is unlikely to be caused by core code.

Quote
We did a customization to the Contact record

When you say a customisation, do you mean that you customised it via the admin user interface e.g. here http://d45.demo.civicrm.org/civicrm/admin/setting/preferences/address?reset=1, or with some custom code? If it was custom code, have you tried disabling that custom code? Do you have any other custom code running?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

ericross

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • civiadmin
    • National Day of Prayer New York
  • CiviCRM version: 4.6.2
  • CMS version: WordPress 4.1.1
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.4.38
Fixed: Saving Contact drops City and Postal Code
October 09, 2014, 05:38:05 am
Michael,


I removed the USPS address standardization and I'm able to edit addresses again. It looks like my USPS account expired or was disabled. Maybe a bit of code is needed to ignore address standardization if the account is invalid.


Thanks for your help.
Usability Matters.

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: Saving Contact drops City and Postal Code
October 09, 2014, 07:06:15 am

hey eric:

any chance you (or your developer) can investigate and submit the "bit of code" as a PR so others dont get tripped on the same issue.

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Saving Contact drops City and Postal Code

This forum was archived on 2017-11-26.