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

Multiple-record custom field data displays as "[object Object]"


    • Documentation Required?:
    • Funding Source:
      Needs Funding


      In 4.7.0 a problem has appeared with custom field data displaying incorrectly in "tab with table" for multiple-record custom fields (I posted on stackexchange here)

      When two or more multiple-record custom field groups exist the following will often, but not always, occur:

      • The values for some columns will all display as "[object Object]"
      • The values for some columns may appear in the wrong column, and "View Edit more >" may be missing
        See attached screenshot.

      I initially noticed this on my Joomla system after upgrading to 4.7.0 (did not occur in 4.6.11 and earlier), but have also seen the problem in 4.7.0 on a local Drupal test installation. Note: the 4.7 demos on both Drupal and Wordpress (Joomla is an old version) exhibit different behaviour - "No records of type '' found." is seen in cases where custom records do exist.

      Steps to reproduce:

      1. Create a custom field group, Custom1, set to allow multiple records and use default of "tab with table"
      2. Create two alphanumeric fields and two date fields in Custom1
      3. Enter two records in Custom1
      4. Create another custom field group, Custom2, as per Custom1
      5. Enter two records in Custom2
      6. View any contact
      7. Click on Custom 1 tab then click on Custom 2 tab
      8. Problem will usually be evident by now but if not refresh page in browser and click on Custom1 then Custom2 tab again (the order seems important)

      When bad data is displayed, attempting to sort the DataTable by a column will give this error in browser: "DataTables warning: table id=records - Invalid JSON response."




            • Assignee:
              jitendra.purohit Jitendra Purohit
              andrewpthompson Andrew Thompson
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: