Converting Legacy Modules To Sidecar
How to upgrade a legacy module to be Sidecar enabled.
Overview
After upgrading your instance to Sugar 7.x, some custom modules may be left in the legacy backward compatible format. This is normally due to the module containing a custom view or file that Sugar does not recognize as being a supported customization for Sidecar. To get your module working with Sidecar, you will need to remove the unsupported customization and run the UpgradeModule.php
script.
Note: The following commands should be run on a sandbox instance before being applied to any production environment. It is also important to note that this script should only be run against custom modules. Stock modules in backward compatibility should remain in backward compatibility.
Steps to Complete
The following steps require access to both the Sugar filesystem as well as an administrative user.
Note: As of Sugar 10.0, the UpgradeModule.php script has been removed from the codebase. We are providing a zip of the files that were removed so that it is still possible to run the upgrade.
- Begin by downloading this zip file that contains the previously removed code
- Unzip the file and move the contents into your Sugar application at
./modules/UpgradeWizard/
- To upgrade a custom module, identify the module's unique key. This key can be easily found by identifying the module's folder name in
./modules/<module key name>/
. The module's key name will be in the format ofabc_module
. - Next, change to the
./modules/UpgradeWizard/
path relative to your Sugar root directory in your terminal or command line application:cd <sugar root>/modules/UpgradeWizard/
- Run the
UpgradeModule.php
script, passing in the sugar root directory and the unique key of the legacy module:php UpgradeModule.php <sugar root> <module key>
An example is shown below:php UpgradeModule.php /var/www/html/sugarcrm/ abc_module
- The script with then output a series of messages identifying issues that need to be corrected. Once the issues have been addressed, you can then run the
UpgradeModule.php
script again to confirm no errors have been found. - Once completed, log into your instance and navigate to Admin > Repair > Quick Repair and Rebuild. Test the custom module to ensure it is working as expected. There is no guarantee that the module will be fully functional in Sidecar and may therefore require additional development effort to ensure compatibility.