CRM-20517 Submitting a Profile results in a "Contact Sub Type does not match" error when the contact subtype of an existing contact does not match the Profile subtype

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.18
    • Fix Version/s: 4.7.20
    • Component/s: None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Recreated on demo site:

      1. Create a custom field on Individual-subtype 'Parent'
      2. Create a record with the subtype 'Student', with email address 'test@test.com'
      3. Create a profile that exposes the custom field created in #1, along with the contact email address
      4. Set the profile to match the existing contact
      5. Run the profile in 'create' mode, enter any data into the custom field, and 'test@test.com' as the address
      6. You get an error: "The Contact Sub Type does not match the Contact type for this record"

      This happens because of a call to implodePadded in CRM/Contact/BAO/Contact.php. The resulting string ends up with multiple delimiters between the imploded values.

      PR coming shortly.

        Attachments

          Activity

          [CRM-20517] Submitting a Profile results in a "Contact Sub Type does not match" error when the contact subtype of an existing contact does not match the Profile subtype
          Andrew West added a comment -

            People

            • Assignee:
              Unassigned
              Reporter:
              Andrew West

              Dates

              • Created:
                Updated:
                Resolved: