I need to check my Case module hooks, but I don’t have the “standard” file available in Github, because it’s only created by the installer during installation.
Can somebody please tell me where the hook file is created by the installer (probably modules/Cases/logic_hooks.php) and paste here (inside “code” tags) the correct contents of that file?
A couple of things:
Please state your version. I believe anything 7.7.* will be good for me to check my hooks.
Please do a quick check that your Case Updates threaded are working before sending me the file. Just add a threaded update to any case and see it gets saved correctly. I want to compare a working installation to my own system that has this bug.
First of all, thank you, your help is much appreciated!
That is weird, I can’t seem to find the right place and way of firing this hook:
$hook_array['before_save'][] = Array(10, 'Save case updates', 'modules/AOP_Case_Updates/CaseUpdatesHook.php','CaseUpdateUpdatesHook', 'saveUpdate');
I had that hook in my old system (in custom/modules/Cases/logic_hooks.php, before the AOP modules where moved from there), and I believe I messed things up when I migrated and was copying things manually from my custom directory.
But there should be something equivalent in the new systems… or else the Case updates wouldn’t work for anybody. Can you find that hook definition anywhere in your working system?
$hook_array['before_save'][] = Array(10, 'Save case updates', 'modules/AOP_Case_Updates/CaseUpdatesHook.php','CaseUpdatesHook', 'saveUpdate');
(I have changed: CaseUpdateUpdatesHook to CaseUpdatesHook (removed the first “Update”): I searched it and haven’t found it in the files. Maybe that is the problem.)
Alternatively, is the file still in the custom folder?
@amariussi I apologize, that was just an error copy-pasting from the Linux terminal which broke my line in two. I have the correct value as ‘CaseUpdatesHook’ in my system.
I do have the file in ‘modules/AOP_Case_Updates/CaseUpdatesHook.php’, I just can’t get the hook registered correctly for some reason or conflict that I don’t understand. That’s why I’m trying to find exactly how that hook is registered in working systems.