User tests: Successful: Unsuccessful:
Thank you @brunobatista for this fix!
JoomlaCode: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32133&start=0
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-27 14:18:37 |
Title |
|
@infograf768 Thank you for the information, I will look into it today!
Basically the issue is that because onAfterDispatch is now called before the rendering of the component the JPATH_COMPONENT_SITE
3 vars aren't defined. Which causes b/c issues in those plugins.
I think there are probably other b/c issues as well. So the tracker talks about wanting the system plugins to have executed before the component loads. But you could play it the other way around? What if the onAfterDispatch is being used to edit the CSS/JS being loaded by components into JDocument (something very painful but is done in real life on a day to day basis)
I kinda feel like whilst technically correct this is one of those PR's that should probably just be reverted and left for 4.0
This is definitely something to revert because now onAfterDispatch event is not called after dispatch :D
Not sure if create onBeforeDispatch event would make sense
@Kubik-Rubik @dbhurley Remember the discussion we had about this in Manchester?
FWIW, onAfterDispatch
has always been the event run immediately after a component has been rendered (see https://github.com/joomla/joomla-cms/blob/2.5.x/includes/application.php#L197 in 2.5.x) and this trigger probably should not move at all.
I agree, lets revert this and find out what the original issue was. I'm not sure even after reading the tracker three times now.
If it's only the importing of the system plugins in the error document (?), then I'm sure that can be solved otherwise.
@brunobatista Can you elaborate what the initial reason was why you wanted to move the event trigger? It looks like it was in the same place since 2.5 (https://github.com/joomla/joomla-cms/blob/2.5.x/libraries/joomla/application/application.php#L283).
This has now been reverted. Thanks
This has broken language filter associations on a multilang site:
we now get:
Notice: Use of undefined constant JPATH_COMPONENT_SITE - assumed 'JPATH_COMPONENT_SITE' in /ROOT/plugins/system/languagefilter/languagefilter.php on line 599
as the call is in the onAfterDispatch