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

Tabbed custom data for contact subtypes don't save

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.4, 4.5.5, 4.5.6
    • Fix Version/s: 4.5.7, 4.6
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      This affects both single- and multi-value tabbed custom data, but not the new tabbed with table or inline custom data. I've duplicated this on the 4.5 and 4.6 alpha demo sites. Here's the fix I put together, but I don't think this exactly how it should be done, partly because I don't know the difference between the $form->_subType and $form->_contactSubType in this case.

      diff --git a/CRM/Custom/Form/CustomData.php b/CRM/Custom/Form/CustomData.php
      index 84caed3..3484b0e 100644
      — a/CRM/Custom/Form/CustomData.php
      +++ b/CRM/Custom/Form/CustomData.php
      @@ -114,6 +114,10 @@ class CRM_Custom_Form_CustomData {
      $getCachedTree = isset($form->_getCachedTree) ? $form->_getCachedTree : TRUE;

      $subType = $form->_subType;
      +
      + if (isset($form->_contactSubType) && $subType == NULL)

      { + $subType = $form->_contactSubType; + }

      if (!is_array($subType) && strstr($subType, CRM_Core_DAO::VALUE_SEPARATOR))

      { $subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($subType, CRM_Core_DAO::VALUE_SEPARATOR)); }

        Attachments

          Activity

            People

            • Assignee:
              atif.shaikh Atif Shaikh
              Reporter:
              jlacey Joseph Lacey
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: