|
2 | 2 | sidebar_position: 5 |
3 | 3 | --- |
4 | 4 |
|
5 | | -Compatibility Plugin |
6 | | -==================== |
7 | | - |
8 | | -:::tip[Developer Note] |
9 | | - Since this version of Joomla has not been released yet, this page can change anytime. |
10 | | -::: |
11 | | - |
12 | | -:::warning[Developer Note] |
13 | | - Heads-up, don't create a plugin as `behaviour` plugin because it's possible that this group get removed at some point. |
14 | | -::: |
15 | | - |
16 | | -## Joomla 5 Compatibility Plugin |
17 | | - |
18 | | -As part of Joomla! 5.0 a plugin was introduced which enhance backward compatibility between Joomla 5 and 4. |
19 | | -Please check the [Backward Compatibility Plugin](https://manual.joomla.org/migrations/44-50/compat-plugin.md) for more details. |
20 | | - |
21 | | -For more detail check [Compatibility Plugin Joomla! 5.0](https://manual.joomla.org/migrations/44-50/compat-plugin). |
| 5 | +Compatibility Plugins |
| 6 | +===================== |
22 | 7 |
|
23 | 8 | ## Joomla 6 Compatibility Plugin |
24 | 9 |
|
25 | | -In Joomla! 6.0 the Compatibility Plugin introduced in Joomla! 5.0 will be replaced by a new plugin |
26 | | -called "Behaviour - Backward Compatibility 6". |
| 10 | +The **‘Behaviour – Backward Compatibility 6’** plugin is essential for the migration from Joomla! 5.4 to 6.x. |
| 11 | + |
| 12 | +In Joomla 5.4, this plugin is installed and enabled by default, but it does not perform any actions. |
| 13 | +Its presence ensures that when the site is upgraded to Joomla 6, the updated code can run immediately, |
| 14 | +and any third-party extensions requiring the plugin to be enabled in Joomla 6 will not cause the update to fail. |
27 | 15 |
|
28 | | -Despite the warning about the potential removal of the `behaviour` plugin type, this compatibility plugin still uses |
29 | | -this type to ensure it loads before any other plugin, as this is critical for backward compatibility functionality. |
| 16 | +As a `behaviour`-type plugin, it loads before any other plugin — |
| 17 | +a critical requirement for ensuring backward compatibility. |
30 | 18 |
|
31 | | -### CMS BaseApplication and CLI Classes |
| 19 | +For upgrades from Joomla! 5.4 to Joomla! 6.x, it is mandatory that this plugin is both installed and enabled. |
| 20 | +To review which backward compatibility cases have been removed, see |
| 21 | +[Removed and Backward Incompatibility](../removed-backward-incompatibility). |
32 | 22 |
|
33 | | -- PR's: |
34 | | - - https://github.com/joomla/joomla-cms/pull/42884 |
35 | | - - https://github.com/joomla/joomla-cms/pull/44926 |
36 | | -- Description: Any reference to the class `\Joomla\CMS\Application\BaseApplication` and `\Joomla\CMS\Application\CliApplication` with the respective CLI input classes should be replaced with the namespace `\Joomla\Application`. Cli apps should be replaced by console plugins. |
| 23 | +:::tip NEW INSTALLATIONS |
| 24 | +For new Joomla! 6.0 installations, the **‘Behaviour – Backward Compatibility 6’** |
| 25 | +plugin is installed but disabled by default. |
| 26 | +::: |
37 | 27 |
|
38 | | -### `JPATH_PLATFORM` Constant |
| 28 | +Related PRs are: |
| 29 | +* [45336](https://github.com/joomla/joomla-cms/pull/45336) |
| 30 | + Introduce Joomla 6.0 compatibility plugin |
| 31 | +* [45371](https://github.com/joomla/joomla-cms/pull/45371) |
| 32 | + Add compat6 behaviour plugin to 5.4 so it is available and enabled when updating to 6.x. |
| 33 | +* [45480](https://github.com/joomla/joomla-cms/pull/45480) |
| 34 | + Introduce Joomla 6.0 compatibility plugin |
| 35 | +* [45493](https://github.com/joomla/joomla-cms/pull/45493) |
| 36 | + Add pre-update checks for backward compatibility plugins for update to Joomla 6 |
| 37 | +* [45525](https://github.com/joomla/joomla-cms/pull/45525) |
| 38 | + Add compat6 behaviour plugin to 5.4 with enabled options |
| 39 | +* [45973](https://github.com/joomla/joomla-cms/pull/45973) |
| 40 | + Don't insert duplicate records in update SQL scripts when they are executed multiple times |
| 41 | + |
| 42 | +:::warning DEVELOPER NOTE |
| 43 | +Avoid creating your own plugin within the *Behaviour* group, as this group may be removed in a future release. |
| 44 | +::: |
39 | 45 |
|
40 | | -- PR: https://github.com/joomla/joomla-cms/pull/44638 |
41 | | -- File: All bootstrapping files |
42 | | -- Description: The `JPATH_PLATFORM` is an old constant and should not be used if the Joomla core got correctly bootstrapped. Change your checks to `_JEXEC` |
43 | | -```php |
44 | | -// Old: |
45 | | -\defined('JPATH_PLATFORM') or die; |
| 46 | +## Joomla 5 Compatibility Plugin |
46 | 47 |
|
47 | | -// New: |
48 | | -\defined('_JEXEC') or die; |
49 | | -``` |
| 48 | +Introduced in Joomla! 5.0, the **‘Behaviour – Backward Compatibility’** |
| 49 | +plugin improves compatibility between Joomla 5 and 4. |
50 | 50 |
|
51 | | -### CMS Input Package |
| 51 | +When upgrading from Joomla! 5.4 to Joomla! 6.x, this plugin must be disabled before starting the upgrade. |
| 52 | +If the site fails to load after disabling it in Joomla 5.4, simply re-enable the plugin to restore functionality. |
| 53 | +The errors should then be investigated and resolved while still running Joomla 5.4, before attempting the upgrade again. |
52 | 54 |
|
53 | | -- PR's: |
54 | | - - https://github.com/joomla/joomla-cms/pull/42805 |
55 | | - - https://github.com/joomla/joomla-cms/pull/42890 |
56 | | - - https://github.com/joomla/joomla-cms/pull/44925 |
57 | | -- Description: Any reference to the class `\Joomla\CMS\Input\Input` or the other classes in that namespace should be replaced with the [framework `Input`](https://github.com/joomla-framework/input) package and the namespace `\Joomla\Input`. The packages can be used nearly interchangeably. |
| 55 | +This approach ensures that any incompatibilities are detected and fixed safely in the Joomla 5.4 environment, |
| 56 | +avoiding partial or corrupted upgrades that may occur if the site crashes during the upgrade process. |
0 commit comments