Health Check Error: Unsupported Property Access

    Overview

    The Health Check wizard must be run when upgrading to evaluate whether your instance is suitable for upgrade. During the health check, various types of issues may be detected which can affect your ability to upgrade. This article will cover the “Unsupported property access” error reported by the health check.

    Symptoms

    This error generates an output similar to the following in health check:

    HC UnsupportedPropertyAccess

    Resolution

    The generated error message will help determine the contents of the file causing the health check error. To address this issue, the code-level customization will need to be corrected or removed before proceeding with the upgrade.

    The example error shown above was caused by a problem in the named file, ./custom/include/ChartReports/SummaryQuery.php. The example custom code uses a property, field_name_map, which has been removed in Sugar 7.9 and above. We can see this on line 551 of the problematic file:

    if ($fieldDef['type'] == 'relate') {
      $relateId = $fieldDef['id_name'];
      $fieldDef = $this->full_bean_list[$tableKey]->field_name_map[$relateId];
    }

    The field_defs property should be used instead of field_name_mapfield_defs is compatible with all Sugar versions. In order to proceed with the upgrade, either update or remove the offending line of code or disable the specified file so that it no longer references the removed property.

    if ($fieldDef['type'] == 'relate') {
      $relateId = $fieldDef['id_name'];
      $fieldDef = $this->full_bean_list[$tableKey]->field_defs[$relateId];
    }

    Once the necessary change has been made, please navigate to Admin > Repair and perform a “Quick Repair and Rebuild”. Then, perform the health check again to confirm that the error is no longer reported.

    in Troubleshooting Health Check Output

    Reach out to us for help