Skip to content

Conversation

@richard67
Copy link
Member

@richard67 richard67 commented Sep 13, 2023

Pull Request for Issue # .

Summary of Changes

This pull request (PR) adds the compatibility plugin from 5.0 to 4.4 so that it's available when updating to 5.0.

The plugin as such is more or less empty so it doesn't do anything on 4.4.

It needs to be there when updating to 5.0 before the database updates run, otherwise you get an exception when having a system plugin installed and enabled which descends from JPlugin.

Testing Instructions

Test 1: Reproduce the issue

  1. On a clean 4.4-dev or latest 4.4 nightly build or 4.4-alpha4 installation, install the following plugin and enable it after installation: https://test5.richard-fath.de/ttest2.zip

  2. Update to the latest 5.0 nightly build or an update package build from the current 5.0-dev branch.

Result: See section "Actual result BEFORE applying this Pull Request" below.

Test 2: Test the fix from this PR with a new 4.4 installation with the fix

  1. On a clean 4.4-dev or latest 4.4 nightly build or 4.4-alpha4, apply the patch of this PR.

  2. Make a new installation.

  3. Install the following plugin and enable it after installation: https://test5.richard-fath.de/ttest2.zip

  4. Update to the patched package or custom update URL created by Drone for PR [5.0] Handle compat plugin already existing in 4.4.0 when updating to 5 #41739 .

Result: See section "Expected result AFTER applying this Pull Request" below.

Test 3: Test the fix from this PR with a 4.4 previously updated to the 4.4 with the fix

  1. On a clean 4.4-dev or latest 4.4 nightly build or 4.4-alpha4 installation without the patch of this PR applied, update to the patched package or custom update URL created by Drone for this PR here.

  2. Install the following plugin and enable it after installation: https://test5.richard-fath.de/ttest2.zip

  3. Update to the patched package or custom update URL created by drone for PR [5.0] Handle compat plugin already existing in 4.4.0 when updating to 5 #41739 .

Result: See section "Expected result AFTER applying this Pull Request" below.

Actual result BEFORE applying this Pull Request

Depending on your global configuration settings for "Error Reporting" and "Debug System", you get the following results:

  • When "Error Reporting" is set to "Default" or "None" and "Debug System" is switched off, you just get an internal server error 500 without any information about the reason. The update log "administrator/logs/joomla_update.php" ends after the update package has been unpacked, i.e. the database updates and other steps have not run.
  • When "Error Reporting" is set to "Maximum" and "Debug System" is switched on, you will see 2 errors, 1. an SQL error caused by the SQL updates not having run, and 2. an error ERROR Class "JPlugin" not found. The latter error is the reason why the finalization step of the update is not started and the database updates have not run.

Expected result AFTER applying this Pull Request

The update succeeds.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

@richard67 richard67 marked this pull request as draft September 13, 2023 13:17
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.4-dev labels Sep 13, 2023
@richard67 richard67 changed the title [4.4] Add Joomla 5 compat plugin to 4.4.0 to fix class "JPlugin" not found error on update [4.4] Add Joomla 5 compat plugin to 4.4.0 to fix class "JPlugin" not found error on update to 5 Sep 13, 2023
@HLeithner HLeithner marked this pull request as ready for review September 13, 2023 14:49
@laoneo
Copy link
Member

laoneo commented Sep 13, 2023

Is this needed only for the class JPlugin or all J* classes?

@Fedik
Copy link
Member

Fedik commented Sep 13, 2023

For all J* classes. Any system plugin still may use one of J* class in constructor or in other system events.

@richard67
Copy link
Member Author

To be honest, I am not very happy with my solution, but it seems there is no other way to fix the issue, or any other way would be worse.

@HLeithner HLeithner merged commit b04c168 into joomla:4.4-dev Sep 13, 2023
@HLeithner
Copy link
Member

thanks

@richard67 richard67 deleted the 4.4-dev-add-j5-compat-plugin branch September 13, 2023 16:00
HLeithner added a commit that referenced this pull request Sep 19, 2023
* [4.4] Upmerge (#41733)

* [4.3] fix localised cli installation (#41706)

* [4.3] Work around a successful upgrade with silent errors (#41367)

* Log all

* Capture errors

* Log messages

* Error collector

* Error collector

* More error collecting

* More error collecting

* Show errors

* Cli command check errors

* phpcs

* phpcs

* Back button and better text

* phpcs

* logs

* Make sure logging is working before continue

* Apply suggestions from code review

---------

Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Harald Leithner <[email protected]>

* cs

---------

Co-authored-by: heelc29 <[email protected]>
Co-authored-by: Fedir Zinchuk <[email protected]>
Co-authored-by: Richard Fath <[email protected]>

* [4.3] Fix untranslated constants in script.php (#41734)

* restrict choicesjs input on container (#41478)

* [4.4] Add Joomla 5 compat plugin to 4.4.0 to fix class "JPlugin" not found error on update to 5 (#41738)

* Add J5 compat plugin to 4.4.0

* Adapt provider.php to latest changes in 5.0-dev

* Add to ExtensionsHelper

* Use protected = 0

* Better XML description.

* Use correct creationDate in XML file

Co-authored-by: Brian Teeman <[email protected]>

---------

Co-authored-by: Brian Teeman <[email protected]>

* [4.4] Smart Search: Limiting highlighting of tokens (#41463)

* Smart Search: Limiting highlighting of tokens

* Update components/com_finder/tmpl/search/default_results.php

Co-authored-by: Quy <[email protected]>

* Adding inline help text

---------

Co-authored-by: Quy <[email protected]>
Co-authored-by: Olivier Buisard <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
Co-authored-by: Martin Carl Kopp <[email protected]>

* No longer a code owner

build.xml is part of the testing team stuff and the rest I’m removing myself from

* Fields is maintained by everybody now

* Invalid import from upmerge

* Set the configuration options through a command (#41787)

* Set the configuration options through a command

* cs

* PHP 8.2 Creation of dynamic property (#41554)

* Fix deprecated message in categories (#41587)

* [4.3] fix finder common words (#41468)

* [4.3] Fix missing filter for subject (#41726)

* Fixed database upmerge conflicts

* Update installation/sql/mysql/base.sql

Co-authored-by: Richard Fath <[email protected]>

---------

Co-authored-by: heelc29 <[email protected]>
Co-authored-by: Fedir Zinchuk <[email protected]>
Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Magnus Singer <[email protected]>
Co-authored-by: Brian Teeman <[email protected]>
Co-authored-by: Hannes Papenberg <[email protected]>
Co-authored-by: Quy <[email protected]>
Co-authored-by: Olivier Buisard <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
Co-authored-by: Martin Carl Kopp <[email protected]>
Co-authored-by: George Wilson <[email protected]>
Co-authored-by: Denitz <[email protected]>
Co-authored-by: Christiane Maier-Stadtherr <[email protected]>
@laoneo laoneo added this to the Joomla! 4.4.0 milestone Sep 28, 2023
Kostelano added a commit to JPathRu/localisation that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators PR-4.4-dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants