7.6.3 Unable to load custom logic file: custom/include/social/hooks.php

I just upgraded from 7.5.3 and this message appears in my suitecrm.log:

“Unable to load custom logic file: custom/include/social/hooks.php”

I looked in this directory but the file doesn’t exist. It didn’t exist on 7.5.3 either. Anybody know what this error is and how to fix it?

Thanks.

I think that this is a known and resolved bug of that version.

check if there is a file called hooks.php in the folder include/social

If you find it then open the file custom/modules/logic_hooks.php and if you find the following line:

$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js'); 

you should edit it to become:

$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'include/social/hooks.php','hooks', 'load_js'); 

(you remove the portion “custom/”)

Then run a quick repair and rebuild and I think it should work.

If you have important data and have modified your code I always recommend to perform a backup of both the full database and all your files before touching the code.

Note that this is not an upgrade safe fix, but in the following versions it should be correct.

2 Likes

Yes, that solved the problem. Thank you.

I would just like to say this was also a problem for me. I upgraded from 7.3.x to 7.7.2 at one time (3 upload packages)… and none of those upgrades fixed the issue, but your suggestion did fix it.

Thanks,
sieberta

I have the same problem. I applied the changes to the file but I cannot login.

How can I run a quick repair and rebuild without being logged in?

regards

cedric

This bug, nor the required fix, should have any effect on logging in. What happens when you try and log in?

sieberta

I keep on getting “You have been logged out because your session has expired.” and I looked in the log file and saw Unable to load custom logic file: custom/include/social/hooks.php

but probably these two problems are not related.

cedric

I have recently noticed that the session expired message is at the top even if the credentials are bad. Further down in the page, inside the login dialog box, it would also say something about the credentials being bad. Just wanted to mention this in case you were missing that extra note. This should show up in the logs, I think even at the error level, if that were the issue.

sieberta

thanks for the input but its not that. It is probably another issue. I found a lot of similar entries which describe this problem without proper solution.

I try to migrate the installation to another server and check out whether it works there.

regards

cedric