? Success

User tests: Successful: Unsuccessful:

avatar Kubik-Rubik Kubik-Rubik - open - 27 Jul 2014
avatar dbhurley dbhurley - change - 27 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-27 14:18:37
avatar dbhurley dbhurley - change - 27 Jul 2014
Title
Updated PR - Fixed wrong call trigger after render component #2095
[#32133] Updated PR - Fixed wrong call trigger after render component #2095
avatar dbhurley dbhurley - close - 27 Jul 2014
avatar dbhurley dbhurley - close - 27 Jul 2014
avatar infograf768
infograf768 - comment - 5 Aug 2014

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

avatar Kubik-Rubik
Kubik-Rubik - comment - 5 Aug 2014

@infograf768 Thank you for the information, I will look into it today!

avatar wilsonge
wilsonge - comment - 5 Aug 2014

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

avatar phproberto
phproberto - comment - 5 Aug 2014

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

avatar Bakual
Bakual - comment - 5 Aug 2014

@Kubik-Rubik @dbhurley Remember the discussion we had about this in Manchester? :smiley:

avatar mbabker
mbabker - comment - 5 Aug 2014

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.

avatar Bakual
Bakual - comment - 5 Aug 2014

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.

avatar dbhurley
dbhurley - comment - 5 Aug 2014

@Bakual Yes, I remember this discussion in detail. I agree with the revert and fix the previous issue a better way.

avatar Bakual
Bakual - comment - 5 Aug 2014

@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).

avatar Kubik-Rubik
Kubik-Rubik - comment - 5 Aug 2014

@Bakual @dbhurley Yes, please revert the changes. We should check in more detail what the initial problem was.

avatar infograf768
infograf768 - comment - 6 Aug 2014

This has now been reverted. Thanks

Add a Comment

Login with GitHub to post a comment