? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
1 Mar 2022

Pull Request for Issue #37124 .

Summary of Changes

This pull request (PR) fixes the database checker's method for fixing the update version so it finds the manifest XML in all cases and so uses the right extension version and not an empty string when being used for 3rd party extensions.

At other places in the same source file it is already done in the right way, e.g. here
https://github.com/joomla/joomla-cms/blob/4.1-dev/administrator/components/com_installer/src/Model/DatabaseModel.php#L192-L196
or here
https://github.com/joomla/joomla-cms/blob/4.1-dev/administrator/components/com_installer/src/Model/DatabaseModel.php#L563-L568

The issue is only relevant for J4 because the functionality of the database checker to check not only the CMS core but also 3rd party extensions is a new J4 feature.

Testing Instructions

  1. Install a plugin which includes an <update> tag in its manifest XML and has some update SQL scripts.
    You can use the following dummy plugin: https://test5.richard-fath.de/plg_test_pr_37160.zip

  2. Go to "System - Manage - Database".

  3. Check that there is no problem shown for that plugin.

  4. Select the row of the plugin and use the "Fix Structure" button regardless of no problems being shown.
    Result: Now there is one problem shown for the plugin.

  5. Hover over the badge with the "1 problem" to see the details.
    Result: The problem is about not matching versions, of which one is an empty string.
    See screenshot in section "Actual result BEFORE applying this Pull Request" below.

  6. Apply the patch of this PR.

  7. Go back to "System - Manage - Database".
    Result: The problem from step 4 is still shown.

  8. Select the row of that plugin (check box) and use the "Fix structure" button.
    Result: No problem shown.

  9. Repeat step 8 a few times to be sure it works well now.

  10. Finally test if there is no issue with using the fix button for any other kind of extension which has update SQL scripts. You can use the patchtester extension for this test.

Actual result BEFORE applying this Pull Request

When using the "Fix structure" button of the database checker for a 3rd party plugin or a 3rd party backend module which come with own update SQL scripts so they are shown in the checker, the version in the manifest cache is set to an empty string, so after the fix you have this database problem:

pr-37160_1

Expected result AFTER applying this Pull Request

When using the "Fix structure" button of the database checker for a 3rd party plugin or a 3rd party backend module which come with own update SQL scripts so they are shown in the checker, the version in the manifest cache is set to the right value from the manifest XML file, so there are no problems shown after using the "Fix Structure" button..

pr-37160_2

Documentation Changes Required

None.

avatar richard67 richard67 - open - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Mar 2022
Category Administration com_installer
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
637516f 1 Mar 2022 avatar richard67 CS
avatar richard67 richard67 - change - 1 Mar 2022
Labels Added: ?
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
Title
[4.1] Fix the update version fix of the database fix for 3rd party extensions
[4.1] [WiP] Fix the update version fix of the database fix for 3rd party extensions
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
The description was changed
avatar richard67 richard67 - edited - 1 Mar 2022
avatar richard67 richard67 - change - 1 Mar 2022
Title
[4.1] [WiP] Fix the update version fix of the database fix for 3rd party extensions
[4.1] Fix the update version fix of the database fix for 3rd party extensions
avatar richard67 richard67 - edited - 1 Mar 2022
avatar avjoomla avjoomla - test_item - 1 Mar 2022 - Tested successfully
avatar avjoomla
avjoomla - comment - 1 Mar 2022

I have tested this item successfully on 9d5ecfe

I tested with your patch and the fix works. Thanks for taking care of this issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37160.

avatar khu5h1 khu5h1 - test_item - 1 Mar 2022 - Tested successfully
avatar khu5h1
khu5h1 - comment - 1 Mar 2022

I have tested this item successfully on 9d5ecfe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37160.

avatar richard67 richard67 - change - 1 Mar 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 1 Mar 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37160.

avatar bembelimen bembelimen - change - 3 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-03 02:14:00
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 3 Mar 2022
avatar bembelimen bembelimen - merge - 3 Mar 2022
avatar bembelimen
bembelimen - comment - 3 Mar 2022

Thx

Add a Comment

Login with GitHub to post a comment