Hi,
I didn't find any information about this issue:
in
https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4
If it is not, it would be good to add it, this can be very useful information for developers.
In Short:
Plugin events with name, which does not start with "on" work in Joomla 3 but do not work in Joomla 4 (no error or warning message, plugin event is just ignored).
Each Joomla plugin event function where the name does not start with "on" needs to be changed to name starting with "on".
This does not affect only function in plugins but even the call in extensions.
Plugin:
FROM:
public function SpecificPluginGroupBefore...
TO:
public function onSpecificPluginGroupBefore...
Extension
FROM:
Factory::getApplication()->triggerEvent('SpecificPluginGroupBefore...'
TO:
Factory::getApplication()->triggerEvent('onSpecificPluginGroupBefore ...'
I still didn't find the reason why this convention was not strict in J3 but in J4, but at least it will be great to document it for other developers starting to overwrite their extension.
Labels |
Added:
No Code Attached Yet
|
Done
thank you
p.s
close the issue then
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-16 18:11:05 |
Closed_By | ⇒ | PhocaCz |
I was wasting half of the day "on" this issue.
Thanks for finding this, it would be great if you could update the documentation too.