Fix ajax error on rendering multi custom data tab when field limit reached.
authoreileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 01:38:58 +0000 (14:38 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 22 Mar 2018 01:38:58 +0000 (14:38 +1300)
commitac9dd8dc59a300d3e24ff33c12cffa1217cab39c
treed5c5403aeb633e85321eb76e990e58845b6de9a6
parent622cae0bf2418a1a52960074b9f3bc01d4ecd629
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