OK, Iām banging my head over this. Nothing I do will make the deprecated code warnings disappear.
Some posts hint that there is a cache where SuiteCRM actually caches PHP code, so changes Iām making might not even be taking effect. There seems to be no way to āflush the cache.ā (And yes, Iāve restarted apache, and Iāve rebooted the server.)
Following the instructions about ālogic hooks,ā I did the following, which had NO EFFECT WHATSOEVER.
This seems to be a well-documented, long-standing problem (unwanted deprecated-code error messages displaying), suggesting that maybe the code base itself is simply not being updated? Should I abandon my attempts to evaluate SuiteCRM as a possible solution? If I paid for SugarCRM hosted on my server, would things be any different?
Added file: /custom/modules/logic_hooks_no_err_disp.php
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class logic_hooks_class
{
function after_entry_point_method($event, $arguments)
{
error_reporting(0);
}
}
?>
Original logic_hooks.php:
<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['after_ui_footer'] = Array();
$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload');
$hook_array['after_ui_frame'] = Array();
$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign');
$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js');
$hook_array['after_save'] = Array();
$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select');
$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges');
$hook_array['after_delete'] = array();
$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete');
$hook_array['after_restore'] = array();
$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore');
?>
Modified logic_hooks.php
<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['after_ui_footer'] = Array();
$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload');
$hook_array['after_ui_frame'] = Array();
$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign');
$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js');
$hook_array['after_save'] = Array();
$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select');
$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges');
$hook_array['after_delete'] = array();
$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete');
$hook_array['after_restore'] = array();
$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore');
$hook_array['after_entry_point'] = Array();
$hook_array['after_entry_point'][] = Array(1, 'after_entry_point no_err_disp','custom/modules/logic_hooks_no_err_disp.php',
'logic_hooks_class','after_entry_point_method');
?>
Iād appreciate any guidance on this. Itās incredibly frustrating to try to evaluate a solution that constantly spurts out error messages.
Iāve also tried other solutions, including replacing the deprecated code, which also didnāt work.