User tests: Successful: Unsuccessful:
Pull Request for Issue #37124 .
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.
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
Go to "System - Manage - Database".
Check that there is no problem shown for that plugin.
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.
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.
Apply the patch of this PR.
Go back to "System - Manage - Database".
Result: The problem from step 4 is still shown.
Select the row of that plugin (check box) and use the "Fix structure" button.
Result: No problem shown.
Repeat step 8 a few times to be sure it works well now.
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.
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:
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..
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_installer |
Labels |
Added:
?
|
Title |
|
Title |
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
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:
?
|
Thx
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.