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) »
  • SOLVED: Saving NULL for street_address, city, and postal_code in civicrm_address
Pages: [1]

Author Topic: SOLVED: Saving NULL for street_address, city, and postal_code in civicrm_address  (Read 537 times)

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
SOLVED: Saving NULL for street_address, city, and postal_code in civicrm_address
February 18, 2014, 02:43:06 pm
Howdy,

Something odd started a while ago: When we save new records and/or modify existing records, street_address, city, and postal_code information in the civicrm_address table for that record saves as NULL instead.  If I manually change the database record for any of these fields and view the contact in CiviCRM, the data remains intact and displays correctly.  If I open up the CiviCRM page to edit a contact I manually entered data for, that information displays correctly on the editing page.  If I save that contact (without changing anything), the aforementioned fields become NULL again.

It appears that the code that's populating the database UPDATE query has some variable mismatch issues, which is why NULL values are getting overwritten in the database for record writes. I've looked at the schema in the live database, and I can't see anything miskeyed or out of place.  I'm considering turning on debugging tools but I'm (a) not sure that they'll report useful info and (b) there are bold warnings to not use them on live production sites, which this is.

My goal is to get CiviCRM to start saving data to these fields again.  I'm currently looking at records from the last times CiviCRM saved records properly and am cross-referencing that with any Drupal modules I may have installed/activated at that time (I don't expect that Drupal modules would cause this to occur, but...).  I'd appreciate any observations, thoughts, tips, or recommendations for doing so (Other than "Revert back to saved copy of last known 'good' version.") and/or isolating the cause.

Thank you,

Jonathan L.
« Last Edit: February 19, 2014, 11:28:43 pm by Erik Hommel »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 12:12:34 am
Are you experiencing that the street_addess still has data, but the street_name, street_number etc. are all NULL? That is what we are experiencing at one customer install, and we are investigating like hell...
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 06:29:44 am
Howdy,

There's a screenshot of the PHPMyAdmin screen of my two most recent test entries at:

http://texvet.org/civicrm_null_tables.png

That street_address is null, as well as quite a few other fields...

(I'll come back and provide more info, but I'm about to attempt to upgrade Civi and my team's waiting on that, so I gotta go for now...)

Jonathan L.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 09:22:44 am
Okay Jonathan, this is different from what we have. I assume the street parsing setting is still set OK?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 11:33:30 am
Howdy,

FYI: FWIW, I had address parsing turned off.  I enabled that and now it's saving the parsed parts, but it's NULLing out my street_addres, city, and postal_code.

I just upgraded to CiviCRM 4.4.3 this morning, but that's not the cause.  This situation was occurring before I upgraded from 4.2.something.

Jonathan L.

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 02:41:54 pm
Resolved my own issue. 

Address Settings: http://OURWEBSITEURL/civicrm/admin/setting/preferences/address?reset=1

Address Standardization – Removing all info from here (Setting it up to not use an external validator) and saving that change resolved the situation.

Jonathan L.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Saving NULL for street_address, city, and postal_code in civicrm_address table
February 19, 2014, 11:28:13 pm
Thanks for sharing!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • SOLVED: Saving NULL for street_address, city, and postal_code in civicrm_address

This forum was archived on 2017-11-26.