By Benjamin Trenkle on Tuesday, 20 February 2024
Category: February

The Backward Compatibility Plugin and why you should switch it off

Joomla! 5 is there and it brings a lot of improvements. One of them is the “Behaviour - Backward Compatibility” plugin. It’s not a feature you can see in backend or frontend, so what is the purpose of this plugin? Let’s answer the most important questions!

Why was this plugin added to Joomla 5?

Over the last 10 years, the Joomla core modernized many areas of the code. That means certain outdated class structures became obsolete and shouldn’t be used anymore. In Joomla we have a well defined backwards compatibility definition. That means these classes cannot be removed before Joomla 6. But a lot of old, unused classes means slower core and a lot of overhead. On the other hand, having these classes still in core offers a backwards compatibility layer which allows extensions which do not follow the current state of the art of Joomla Development. So extensions from Joomla 3 still run on Joomla 5.

But what about the people who do not use extensions with this older code? In Joomla 4 they have code loaded, which is not used. So the idea is to move all this code to a plugin, which can be disabled when not needed.

What are the benefits of disabling the plugin?

The biggest benefit of disabling the plugin is a big performance boost. Without the plugin the old code is not registered and will never be loaded. You can be sure you have no extension installed which uses old code and you have a higher chance to have a smoother update to Joomla 6.

Where can I find this plugin?

The Backward Compatibility plugin is automatically activated upon upgrading from Joomla 4 to Joomla 5 or on fresh installs. The “Behaviour - Backward Compatibility” plugin is located in the plugin group behaviour. You find the plugins, when you go via the “System” menu item to the plugins area in your backend.

Do I need the Plugin?

That depends on the extensions installed on your website. So there is only one way to find out: disable the plugin, but of course not on your live site. Make a copy of your site and try it in your test environment. It’s recommended to enable the debug mode before you disable the plugin to see better error messages when something is going wrong.

No error? Perfect, you can try to disable it now on the live site (don’t forget to backup before) and you’re good to go.

Find an error? There are several ways to get your site back:

  1. Check which extension is responsible for the error and either check if there is a new version of the extension available or find an alternative for it.
  2. Go to the plugin manager in the backend (System => Plugins) and enable the plugin again.
  3. If the plugin manager is blocked by an error message, you can restore your backup or access the database via e.g. phpMyAdmin and enable the plugin. Find it in the #__extensions table and change “enabled” from 0 to 1. 

What should I do when a 3rd party extension does not work without the plugin?

Don’t disable the plugin 🙂 

For now it’s OK to have the plugin activated, if the performance impact on your site is acceptable for you. But you should either check the developers’ site if there are any plans to get rid of this old code or you should look for alternative extensions to replace the current one.

If my site works with the plugin disabled, does that mean it's Joomla 6 ready?

That’s hard to predict, as Joomla 6 is in an early development phase. Based on the backwards compatibility promise, Joomla 5 sites that work without the plugin have a better chance to have a smooth update process. Having said that: there could always be future changes which can’t be avoided and break something. Right now all we can say is: if your site is not working without the plugin, it will certainly not work with Joomla 6. So it’s still recommended to get a site with disabled plugin as soon as possible.

Leave Comments