jemproject / JEM-Project

JEM - an Event Manager for Joomla
https://www.joomlaeventmanager.net
GNU General Public License v3.0
25 stars 37 forks source link

Install JEM in Joom 5 without backward compatibility plugin: errors #1703

Closed jojo12 closed 5 months ago

jojo12 commented 8 months ago

I installed a fresh Joomla 5.02 and deactivated the plugin Behaviour - Backward Compatibility. All works well. Then I install the latest JEM package.

mckillo commented 8 months ago

Please, you don't deactivate the plugin Behaviour - Backward Compatibility because in this case, JEM doesn't support J5 API native. This backward compatibility plugin is active when JL is migration from J4 to J5 or when you install a J5 new.

The JEM code are supports J4 and J5, The JEM plugins code wasn't changed to J5 API native.

How you can read in this Joomla article: https://manual.joomla.org/migrations/44-50/compat-plugin This plugin helps to support J4 plugin and JEM can be live in J4 & J5. "This gives extension developers or own developments additional 2 years time to update old code to the current standard." In J6, the plugin of J4 doesn't support because in "J6 it's planned that deprecated code get removed finally".

Workaround: If you want to solve part of the issue, edit \plugins\content\jem\jem.php and add this line in the beginning: use Joomla\CMS\Plugin\CMSPlugin; and change the extends in the class to: class plgContentJem extends CMSPlugin

With these lines, you don't have the issue in the plugin, but there are other error in the views to debug other lines in the code of views and models, and this plugin structure too. In the future, with the J6 beta, JEM content plugin will be a new code to support J6. If you want a JEM with J5 API native, then JEM should have one version for J4 and other one for J5. I think that now it's complex for several reasons (resources, time).

Warning-disabling_the_compatibility_plugin

If you deactivate the plugin Behaviour - Backward Compatibility, other extensions in your Joomla 5 can be affected.

mckillo commented 5 months ago

@jojo12 I think that this issue can be closed.

mckillo commented 5 months ago

OK, check plugin files.... give a moment

mckillo commented 5 months ago

I have to upload a big commit with more update from J function to use... I'll try to do it tomorrow, today I don't have time.

jojo12 commented 5 months ago

in plugin jemlistevents.php line 16 there is a Class "JModelLegacy" not found

jojo12 commented 5 months ago

administrator/components/com_jem/views/help/tmpl/default.php (line 15) this is doubled-->gives an error! I deleted line 15 fixed with commit 814b235: