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

The template variable $displayName is never set before invoking the Contact/Page/View/GroupContact.tpl template.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.beta, 3.4.0, 4.0.0, 4.1.0, Unscheduled
    • Fix Version/s: 3.4.alpha
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      I noticed an "Undefined array element: displayName" warning when viewing the group tab of a contact, and inserted the attached patch to debug the problem.

      To fix the problem the run() function needs to retrieve the displayName somewhere before line 128 of CRM/Contact/Page/View/GroupContact.php.

      Unfortunately, I don't know how to fix the problem, but here is the backtrace generated when viewing civicrm/contact/view/group?reset=1&snippet=1&cid=7188 with the attached patch in place:

      [0] => Array
      (
      [file] => sites/all/modules/civicrm/packages/Smarty/Smarty.class.php
      [line] => 1906
      [function] => include
      )

      [1] => Array
      (
      [file] => sites/data.cfcmi.org/files/civicrm/templates_c/en_US/%%0C/0CB/0CBEC124%%default.tpl.php
      [line] => 15
      [function] => _smarty_include
      [class] => Smarty
      [type] => ->
      [args] => Array
      (
      [0] => Array
      (
      [smarty_include_tpl_file] => CRM/Contact/Page/View/GroupContact.tpl
      [smarty_include_vars] => Array
      (
      )

      )

      )

      )

      [2] => Array
      (
      [file] => sites/all/modules/civicrm/packages/Smarty/Smarty.class.php
      [line] => 1906
      [args] => Array
      (
      [0] => sites/data.cfcmi.org/files/civicrm/templates_c/en_US/%%0C/0CB/0CBEC124%%default.tpl.php
      )

      [function] => include
      )

      [3] => Array
      (
      [file] => sites/data.cfcmi.org/files/civicrm/templates_c/en_US/%%A0/A0D/A0D7E591%%snippet.tpl.php
      [line] => 47
      [function] => _smarty_include
      [class] => Smarty
      [type] => ->
      [args] => Array
      (
      [0] => Array
      (
      [smarty_include_tpl_file] => CRM/Form/default.tpl
      [smarty_include_vars] => Array
      (
      )

      )

      )

      )

      [4] => Array
      (
      [file] => sites/all/modules/civicrm/packages/Smarty/Smarty.class.php
      [line] => 1263
      [args] => Array
      (
      [0] => sites/data.cfcmi.org/files/civicrm/templates_c/en_US/%%A0/A0D/A0D7E591%%snippet.tpl.php
      )

      [function] => include
      )

      [5] => Array
      (
      [file] => sites/all/modules/civicrm/CRM/Core/Smarty.php
      [line] => 182
      [function] => fetch
      [class] => Smarty
      [type] => ->
      [args] => Array
      (
      [0] => CRM/common/snippet.tpl
      [1] =>
      [2] =>
      [3] =>
      )

      )

      [6] => Array
      (
      [file] => sites/all/modules/civicrm/CRM/Core/Page.php
      [line] => 173
      [function] => fetch
      [class] => CRM_Core_Smarty
      [type] => ->
      [args] => Array
      (
      [0] => CRM/common/snippet.tpl
      )

      )

      [7] => Array
      (
      [file] => sites/all/modules/civicrm/CRM/Contact/Page/View/GroupContact.php
      [line] => 128
      [function] => run
      [class] => CRM_Core_Page
      [type] => ->
      [args] => Array
      (
      )

      )

      [8] => Array
      (
      [file] => sites/all/modules/civicrm/CRM/Core/Invoke.php
      [line] => 219
      [function] => run
      [class] => CRM_Contact_Page_View_GroupContact
      [type] => ->
      [args] => Array
      (
      [0] => Array
      (
      [0] => civicrm
      [1] => contact
      [2] => view
      [3] => group
      )

      [1] =>
      )

      )

      [9] => Array
      (
      [file] => sites/all/modules/civicrm/drupal/civicrm.module
      [line] => 366
      [function] => invoke
      [class] => CRM_Core_Invoke
      [type] => ::
      [args] => Array
      (
      [0] => Array
      (
      [0] => civicrm
      [1] => contact
      [2] => view
      [3] => group
      )

      )

      )

      [10] => Array
      (
      [function] => civicrm_invoke
      [args] => Array
      (
      [0] => contact
      [1] => view
      [2] => group
      )

      )

      [11] => Array
      (
      [file] => includes/menu.inc
      [line] => 348
      [function] => call_user_func_array
      [args] => Array
      (
      [0] => civicrm_invoke
      [1] => Array
      (
      [0] => contact
      [1] => view
      [2] => group
      )

      )

      )

      [12] => Array
      (
      [file] => index.php
      [line] => 18
      [function] => menu_execute_active_handler
      [args] => Array
      (
      )

      )

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              pillarsdotnet Bob Vincent
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified