Health Check Error: Field type missing

    Overview

    The Health Check wizard must be run when upgrading in order to evaluate your instance’s ability to move to the target version. During the health check, various types of issues may be detected which can affect your ability to upgrade. This article will cover how to resolve a “Field type missing” error reported by the health check.

    Symptoms

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

    image1

    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 edited from Sugar before proceeding with the upgrade.

    Breakdown of health check error:

    • The field in question is ticker_symbol in the Accounts module.
    • In order to identify the file that introduces this error, the issue will typically be found by searching for the field name under the ./custom/Extension/modules/{module name}/Ext/Vardefs/ directory. For this example, you would search for ticker_symbol under the ./custom/Extension/modules/Accounts/Ext/Vardefs/ directory. If no matches were found there, you could check the ./modules/{module name}/vardefs.php directory to see if a non-upgrade safe change was made.
    • The health check detects an issue with the empty field type defined in line 7 of the file.

    For this example, there are two ways to address this health check error:

    • The first method is to remove the line of code referencing the empty field type from the file. The corrected file should look like:

      Note: Removing this line of code will reset type back to its stock value and this should only be done if the field in question is a stock field in the application (i.e. the field name does not end in _c).
    • The second method is to update the line of code referencing the empty field type with the correct value. The corrected file should look like:

      Note: The field type is set to varchar since stock_ticker is a TextField data type field. If the field in question is a stock field, it is advised to employ the first method to resolve this issue to ensure proper functionality of the field moving forward. This method should only be used if the field in question is a custom field (i.e. the field name ends in _c).

    Once the necessary change has been made, please navigate to Admin > Repair and perform a “Quick Repair and Rebuild” to ensure that the changes are synced between the application and database. 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