Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
Spent the last couple hours doing my best to narrow this bug down and report exactly what I think is going on.
Duplicated by..
1. Create two profiles that both load on the drupal user edit screen. One that pulls an individuals "home" address information and another that pulls an individuals "work" address information. (note: this does not work if you add all home and work address fields into 1 profile.. I actually set my system up that way to get around this bug)
2. Through the contact record edit page make sure the user has both home and work location information filled out and take note of which one is set to the users primary location
3. Go to the users drupal edit screen and edit the profile that holds the users "primary" location information.. I think it defaults to home. I checked which one was to to primary by checking the civicrm_address table and seeing what location has "is_primary" field set to 1. (note: It would be a good idea to take note of the changes going on in the db to get an idea of exactly what this bug is doing)
4. Now hit save on the profile that holds the primary location information. You'll notice all appears well and both home and work information is still there.
5. Now go to the profile edit screen for the drupal user that holds the information for the location that is not the primary location. Make some changes and hit save. You'll notice that the primary location information is now completely gone but the work information is still there. If you look at the contacts entries in the civicrm_address table you see there is now 2 entries of the same location type for the same contact.
It appears what is happening is when the profile for the non primary location is submitted the information for that location .. including its location type id is overwriting either all the other locations.. or maybe just the primary locations information. Leaving you with multiple locations entries of the same type for the same contact.