Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 4.7.1
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
If at least two custom field groups exist for contacts, with multiple records and display as tab with table, then the second custom field group will give an error when attempting to sort its table on some/all columns:
DataTables warning: table id=records-10 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
I previously mentioned this in CRM-17918 because it seemed related but Jitendra couldn't reproduce it. Anyway I currently have a configuration that can reproduce this error on the 4.7.2 Drupal demo (not sure how long it'll be there) at http://dmaster.demo.civicrm.org/civicrm/contact/view?reset=1&cid=202
(go to "demo" contact, go to the Custom2 tab and try to sort any column of the DataTable)
Steps to reproduce:
- Create a custom field group "Custom1" for Individual contact type and set to allow multiple records and use default of "tab with table"
- Create two alphanumeric text fields "Field1" and "Field2" and two date fields "Date1" and "Date2" in dd/mm/yyyy format in Custom1
- Create another custom field group, Custom2, with same configuration and fields as for Custom1
- View any contact
- Enter two records for this contact in Custom1 with data in all four fields
- Enter two records for the same contact in Custom2 with data in all four fields
- In the Custom2 tab click on a column heading to attempt to sort it - this should give an error: "DataTables warning: table id=records-10 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1" (may need to refresh the contact and go to Custom2 tab first)