[4.0] Remove onBeforeExecute event from CMS applications#27155
[4.0] Remove onBeforeExecute event from CMS applications#27155wilsonge merged 2 commits intojoomla:4.0-devfrom SharkyKZ:j4/revert/onBeforeExecute
Conversation
|
This is a hard b/c break ?? |
|
@brianteeman i agree... this is a hard b/c break given that it's no more possible to observe the onBeforeExecute event in a third-party extension during a CMS application execution. Are you sure to do this? |
|
This was introduced in 4.0. |
|
@SharkyKZ yes but for example i needed it in my extension, listening for onAfterInitialise won't work for my scenario... if you remove it there is no more chance to listen for an event before the doExecute method in the CMSApplication |
|
It is either leave this hook in and break language loading in plugins or remove the hook. Considering the hook is new to 4.0 whereas the language loading behavior dates back to 1.5, to me it’s an easy choice to remove the hook until the application architecture can be built in a way that the global Language instance does not have to be fully configured before importing plugins. It is a harder B/C break to tell system plugin developers they have to manual load language files because their plugins are imported at a point that they can’t rely on the framework to do it for them as they had for the previous decade. Trust me, I want the hook, that’s why I added it in the first place. But it has created too many problematic side effects for it to sanely go into a stable release, and I’ve been saying that basically ever since the first bug reports came in about those side effects. It should have been reverted much sooner. |
|
@mbabker i trust you... go on |
|
Thanks |
|
And for anyone reviewing this after the merge, the remaining
There IS one "before" event that is safe and expected to be used in the CMS environment, that being the |
Pull Request for Issues #17444, #26715, #26823.
Summary of Changes
This removes
onBeforeExecuteevent added in #12124 from CMS applications.Testing Instructions
a) Enable System - Privacy Consent plugin. Edit your profile.
b) Set up a multilingual site. Browse around the frontend.
Expected result
a) No untranslated strings.
b) Works like before.
Actual result
a) Untranslated strings like
PLG_SYSTEM_PRIVACYCONSENT_LABEL.Documentation Changes Required
IDK.