From ac9dd8dc59a300d3e24ff33c12cffa1217cab39c Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 22 Mar 2018 14:38:58 +1300 Subject: [PATCH] Fix ajax error on rendering multi custom data tab when field limit reached. CRM_Contact_Page_View_CustomData::run() calls CRM_Profile_Page_MultipleRecordFieldsListing::run(). The latter function currently only assigns customGroupId to the tpl if the limit of rows to display has not been reached. However, if the var is a required parameter for the ajax call that follow s and without it the page does not render. There is no clue as to why it is wrapped in the if and changing it does not cause problems in the follow on ajax call CRM_Custom_Page_AJAX::getMultiRecordFieldList The only other place this is called from is CRM_Profile_Form::preProcess when mode is not EDIT and gid is set --- CRM/Profile/Page/MultipleRecordFieldsListing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Profile/Page/MultipleRecordFieldsListing.php b/CRM/Profile/Page/MultipleRecordFieldsListing.php index 4db419686f..d50543595c 100644 --- a/CRM/Profile/Page/MultipleRecordFieldsListing.php +++ b/CRM/Profile/Page/MultipleRecordFieldsListing.php @@ -199,10 +199,10 @@ class CRM_Profile_Page_MultipleRecordFieldsListing extends CRM_Core_Page_Basic { elseif ($this->_pageViewType == 'customDataView') { // require custom group id for _pageViewType of customDataView $customGroupId = $this->_customGroupId; + $this->assign('customGroupId', $customGroupId); $reached = CRM_Core_BAO_CustomGroup::hasReachedMaxLimit($customGroupId, $this->_contactId); if (!$reached) { $this->assign('contactId', $this->_contactId); - $this->assign('customGroupId', $customGroupId); $this->assign('ctype', $this->_contactType); } $this->assign('reachedMax', $reached); -- 2.25.1