compucorp / uk.co.compucorp.civicase

CiviCase Extension
Other
8 stars 16 forks source link

Pass only the field ID to CRM_Core_BAO_CustomField::displayValue #1010

Open agileware-fj opened 7 months ago

agileware-fj commented 7 months ago

Overview

When building the view of custom data for cases, CiviCase was crashing with no error message. Traced this down to a problem loading custom values. Appears to be a problem since 5.67

Before

Array of fieldInfo is passed in

  1. Have custom fields set up for case types.
  2. Go to Cases / Manage Cases.
  3. Click on a case tile to load the information, for one of the cases with custom fields.
  4. Error 500 loading case details, user is left with the placeholder images only

After

Only fieldId is passed in

On step 4, case data is fully loaded.

Comments

As noted, this is a new issue since CiviCRM 5.67; However in earlier versions including 5.51.1, the displayValue function converts passed arrays to an id as the first step anyway, so this should not introduce a compatibility problem