Health Check Error: Logic hook after_ui_frame detected


    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 “Logic hook after_ui_frame detected” error reported by the health check.


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



    To address this issue, the code-level customization will need to be edited from Sugar before proceeding with the upgrade.

    The health check error indicates a custom file is invoking an after_ui_frame logic hook in one of the following locations:

    • ./custom/Extension/application/Ext/LogicHooks/{file name}.php
    • ./custom/modules/logic_hooks.php

    The after_ui_frame hook is no longer supported in the target version of Sugar. The lines of code that contain this hook will need to be commented out or removed from the file. The example health check error was generated by the following custom code:


    In this example, the following line must be removed from the file:

    $hook_array['after_ui_frame'][] = Array(1, 'after_ui_frame_example', 'custom/logic_hooks/logic_hooks_class.php', 'logic_hooks_class, 'after_ui_frame_method');

    The corrected file should then look similar to this:


    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