Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16826

Adding a new address via profile deletes existing address

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      When a user adds a new address via a Profile, an existing address is overwritten.

      Steps to recreate

      • On dmaster
      • Edit the admin account to have one address, type 'Home' and 'Primary'
      • Create a standalone form Profile with the field 'Street address', location type of 'Work'
      • Use the profile in 'edit' mode, eg: /profile/edit?gid=16
      • Enter something in the field and save
      • View the contact record and note that the home address has been overwritten with the work address just entered

      Tracking it down

      It looks like when the profile is saved it takes on the address ID of the contact's existing address, rather than creating a new address.

      This might be related to CRM-10551 but I didn't come across it whilst initially testing that patch, and I would have thought something would have shown up in the test suite.

      Has something changed recently in the way addresses are saved / handled? Are they still considered 'block' fields?

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h