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) »
  • Cannot delete a second address
Pages: [1]

Author Topic: Cannot delete a second address  (Read 718 times)

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Cannot delete a second address
September 10, 2012, 05:42:47 am
I have a contact with two addresses - home and other. I want to delete the 'other' address but when I try to do so I get the error:

Please correct the following errors in the form fields below:
The Location Type should be set if there is Address information.

Any thoughts?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cannot delete a second address
September 10, 2012, 06:59:50 am
I had such a problem once. IIRC, I just played with it and eventually they deleted. That problem came due to direct tampering with the SQL data. That was the issue for that site anyhow.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Cannot delete a second address
September 10, 2012, 07:07:46 am
Thanks for the ultra-speedy reply.  Will take a look.

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Cannot delete a second address
September 10, 2012, 04:20:58 pm
I have had this problem recently too, exactly as described.  I was worried that my database was corrupted somehow.  I will also investigate further.

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Cannot delete a second address
September 11, 2012, 07:00:10 am
Bizarrely, having tried several times on two occasions to delete the address unsuccessfully, I tried a few hours later and was successful. Unfortunately there was no particular reason for this so I can't give you any helpful pointers robinhood.

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Cannot delete a second address
September 11, 2012, 07:59:56 pm
Well, I see that this occurs (at least in my DB) when the location_type_id field in civicrm_address is NULL and master_id is NULL, or when there is a value in master_id that points to a record that has a location_type_id that is NULL.  The location type shows up as "- Select -" in the edit screen.  Screen shot attached.  In this condition, you can't delete the second address and can't select a location type and save it.  So this is not a case of 'Home' and 'Other' locations. That would make it a bit different than LindseyM's description. 

 

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Cannot delete a second address
September 17, 2012, 06:37:34 pm
To close the loop on this:  eventually I found we had about 10 bad records in the civicrm_address table.  I deleted them with a little sql and the problem was solved.  Still dont know the source of the bad data tho.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Cannot delete a second address

This forum was archived on 2017-11-26.