This is related to Invoking hook_custom_tokens and hook_custom_tokenValues in Joomla which used to work. It has now appeared to have stopped working which means that the custom tokens handled by civicrmHooks.php are no longer available. It looks as though civicrmHooks.php is no longer being invoked, as deliberately introducing an error does not result in CiviCRM crashing.

What has changed recently. How can we solve this?


2 Answers 2


I've spot-checked the current 4.7.21-rc and as well as an older version 4.7.15 -- the problem reproduces in both. The problem arises with web-based requests in which these two operations are performed in the wrong order: (a) updating the include_path and (b) loading the civicrmHooks.php from the include_path.

(Doing a proper audit of Joomla regressions is painful, but I'd wager the problem originates in the 4.7 alpha/beta cycle.)

Searching JIRA for civicrmHooks.php turns up a nearly identical issue CRM-19914, which was fixed in WordPress -- but it was incorrectly described/triaged as a "Windows" issue. (The bug actually would have applied to Joomla+WordPress, regardless of OS.)

I'll submit a similar patch for Joomla under CRM-19914.


Tim Otten did some work on trying to unify CMS Hooks and Symphony Events see CRM-19813 I'm not sure what version you were on previously but these changes came in 4.7.19 and maybe related. I know there seems to be some issues in regards to Joomla upgrades which may also be at play. I would recommend commenting on that issue or posting in #dev-postrelease in mattermost and pinging Tim @totten about the issue

  • It is some time since we exercised that functionality, so it is difficult to say when it first broke. I've commented on CRM-19813 and posted on mattermost. Jun 27, 2017 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.