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

Inconsistent Behavior when saving profile with blank fields


    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0, 4.2.0
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:


      Submitting a profile will save all fields as submitted. If info is changed it will be updated, if a field is empty it will be saved as NULL (with the notable exception that email/addr/phone/etc are not fields but entities in their own right, so saving email as blank will do nothing. See CRM-10551)
      Clearing data from blank fields is not desirable when the user is anonymous. To be more exact, it is not desirable if the cid was not known when the form was rendered. Because in that situation, all fields were blank (cid is only determined after submit using dedupe rules) and so leaving a field blank was not an active choice on the part of the user.
      So somehow we need to teach profiles to remove empty params after performing a dedupe match.
      This will be especially important if CRM-10551 is fixed because that will present more data to be potentially erased.

      There are several workarounds for now:

      • Modify default STRICT duplicate matching rule so a match never happens for anonymous input (i.e. a new contact is always created)
      • Make all fields required
      • Use one of the other Advanced Profile Settings for "On duplicate match" - either Issue warning and do not save, OR Create duplicate contact (I think this only works for standalone profiles, not for event registration)

      Going forward we should look at NOT clearing out existing data when input is from anonymous source.

      === Original Post ====
      Title: Employer field overwritten and disabled when the field is left blank during event registration
      When a user registers for an event anonymously and leaves the employer field blank it overwrites what is currently in their record and disables the current employer relationship. I became aware of the problem in version 3.4.8 and was able to successfully duplicate it in 4.1.1.


        1. employer-relationship-inactiv_civicrm_4.6.jpg
          223 kB
          Philipp Michael
        2. inactive-relationship.JPG
          88 kB
          Philipp Michael
        3. registration-without-current-employer.JPG
          36 kB
          Philipp Michael

          Issue Links



              • Assignee:
                dgg David Greenberg
                jehanley Jane Hanley
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created:

                  Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0 minutes
                  Time Spent - 2 hours