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

custom data set limited to subtype won't save in tab

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.6
    • Fix Version/s: 4.5.8
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      to reproduce:

      create a custom data set for indiv/house/org and limit to a specific subtype. set to view in a tab.

      view a contact of this type, select the tab and edit. when you save, the data will not be recorded.

      I traced this to a change in CRM_Contact_Form_CustomData::preProcess, around line 135, where we call CRM_Custom_Form_CustomData::preProcess. we formally did not pass the $subType to that method, we now do. for some reason – for the life of me I can't figure out why – passing that value causes it to be lost on form submission. there's logic in CRM_Custom_Form_CustomData::preProcess to retrieve the subType from the form object if it's not explicitly passed, which works fine. but for some odd reason if you explicitly pass it, it's later lost in that method. as a result, the field and its value is not captured by the $_POST and thus not processed.

      so the simplest solution is to change that back to NULL (don't explicitly pass it). but it would be good for someone else to review it and see if they can find the source upstream.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: