Let the platform do the work

Health Check Error: Found subpanel with link to non-existing module

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 "Found subpanel with link to non-existing module" error (also shown as "subpanelLinkNonExistModule") reported by the health check.

Symptoms

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

Resolution

The generated error message will help determine the contents of the file causing the health check error. Open the offending file and search for the module name from the health check error, and you should find an array such as the following:

$layout_defs["Cases"]["subpanel_setup"]["accounts_cases_1"] = array (
  'order' => 100,
  'module' => 'Example',
  'subpanel_name' => 'default',
  'sort_order' => 'asc',
  'sort_by' => 'id',
  'title_key' => 'LBL_ACCOUNTS_CASES_1_FROM_CASES_TITLE',
  'get_subpanel_data' => 'accounts_cases_1',
);

You will need to take note of the subpanel_setup value within the array (e.g. accounts_cases_1). Once that is done, comment out the entire array from the file. Please note that there may be multiple definitions within the file referencing the invalid module that you need to comment out. Please be sure you do not comment out arrays for other, valid subpanels. Alternatively, if it is the only array contained within the file, you can move the entire file to a "Disabled" directory (e.g. ./custom/Extension/modules/{module_name}/Ext/Layoutdefs/Disabled).

After the file in Layoutdefs is corrected, navigate to the Vardefs directory within that same module (i.e. the full directory path within Sugar should look like ./custom/Extension/modules/{module_name}/Ext/Vardefs/). From that directory, search for the subpanel_setup value you collected earlier via the following command:

grep -Rl {subpanel_setup_value} .

Similar to the exercise on the Layoutdefs file, open any identified files and search for the subpanel_setup value. You should find an array such as the following:

$dictionary["Accounts"]["fields"]["accounts_cases_1"] = array (
  'name' => 'accounts_cases_1',
  'type' => 'link',
  'relationship' => 'accounts_cases_1',
  'source' => 'non-db',
);

Comment out the array from the file. Please note that there may be multiple definitions within the file referencing the subpanel_setup value. Ensure you comment out any arrays that specifically mention the subpanel_setup value. Alternatively, if the only arrays contained within the file reference the subpanel_setup value, you can move the entire file to a "Disabled" directory (e.g. ./custom/Extension/modules/{module_name}/Ext/Vardefs/Disabled).

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.