Answers.Body: <p>I've spot-checked the current <code>4.7.21-rc</code> and as well as an older version <code>4.7.15</code> -- 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 <code>include_path</code> and (b) loading the <code>civicrmHooks.php</code> from the <code>include_path</code>.</p>
  
  <p>(Doing a proper audit of Joomla regressions is painful, but I'd wager the problem originates in the 4.7 alpha/beta cycle.)</p>
  
  <p>Searching JIRA for <code>civicrmHooks.php</code> turns up a nearly identical issue <a href="https://issues.civicrm.org/jira/browse/CRM-19914" rel="nofollow noreferrer">CRM-19914</a>, 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.)</p>
  
  <p>I'll submit a similar patch for Joomla under CRM-19914.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-28T04:13:17.837Z
Answers.Text: Proposed solution: https://github.com/civicrm/civicrm-core/pull/10571
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-28T03:38:30.977Z
Answers.LastActivityDate: 2017-06-28T03:38:30.977Z
Answers.UserDisplayName: Tim Otten
Answers.Body: <p>Tim Otten did some work on trying to unify CMS Hooks and Symphony Events see <a href="https://issues.civicrm.org/jira/browse/CRM-19813" rel="nofollow noreferrer">CRM-19813</a> 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</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-27T10:52:25.413Z
Answers.Text: 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.
Answers.UserDisplayName: Stephen Palmstrom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-21T22:47:16.823Z
Answers.LastActivityDate: 2017-06-21T22:47:16.823Z
Answers.UserDisplayName: Seamus Lee
Body: <p>This is related to <a href="https://civicrm.stackexchange.com/questions/10737/invoking-hook-custom-tokens-and-hook-custom-tokenvalues-in-joomla">Invoking hook_custom_tokens and hook_custom_tokenValues in Joomla</a> 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.</p>
  
  <p>What has changed recently.  How can we solve this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-21T20:07:07.810Z
Comments.Text: There was related work by Frank Gomez during the post-CiviCon St. Louis sprint last month.  Catch him on https://chat.civicrm.org as @ginkgofjg.
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civimail><joomla><tokens>
Title: civicrmHooks.php no longer invoked under Joomla and CiviCRM 4.7.20
ThreadText: # civicrmHooks.php no longer invoked under Joomla and CiviCRM 4.7.20
  
  (Asked by: username_0 on 2017-06-21)
  
  This is related to [Invoking hook\_custom\_tokens and hook\_custom\_tokenValues in Joomla](https://civicrm.stackexchange.com/questions/10737/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?
  
  **Tags:** civimail, joomla, tokens
  
  > **Comments:**
  > **username_1**: There was related work by Frank Gomez during the post-CiviCon St. Louis sprint last month.  Catch him on https://chat.civicrm.org as @ginkgofjg.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-06-28. Score: 1
  
  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](https://issues.civicrm.org/jira/browse/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.
  
  > **Comments:**
  > **username_2**: Proposed solution: https://github.com/civicrm/civicrm-core/pull/10571  
  
  ---
  
  ### Answer by username_3 on 2017-06-21. Score: -1
  
  username_2 did some work on trying to unify CMS Hooks and Symphony Events see [CRM-19813](https://issues.civicrm.org/jira/browse/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
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  