User tests: Successful: Unsuccessful:
Pull Request for Issue # .
With pull request (PR) #35164 , an update SQL script "4.0.0-2021-08-17.sql" has been added (and later been fixed with PR #35176 ) to insert a record into the extensions table for a new com_search package "pkg_search" and create database records for an update site for that package to migrate com_search from a core extension to a core supported extension when updating to J4.
Unfortunately these database records are also added when updating from a 4.0 RC 6 or previous 4.0 RC or Beta version where com_search was not installed (or has been removed after updating from 3.10 to that version).
The result is a package "pkg_search" which can not be uninstalled because the manifest XML file of that package is not there.
This PR here fixes this by adding a new update SQL script which deleted the update site and extension records for that package if no other com_search extension is installed.
This fixes the issue without touching an installation where com_search is really installed.
Normally I would have also changed the update SQL script "4.0.0-2021-08-17.sql" not to insert these records if no other com_search extension is there, but since changing old update SQL scripts is always a subject of discussion I did not do that. So now we have the silly situation that these records are first installed in any case and then later removed again during the update if obsolete.
This PR needs to be tested with all kinds of databases which are supported in Joomla 4, i.e. MySQL or MariaDB and PostgreSQL.
Testers please report back which kind of database server and which version you have used.
If you have more than one available, test with all.
The tests should be performed with "Debug System" switched on and "Error Reporting" set to "Maximum" in Global Configuration to make sure to see any SQL errors.
Thanks in advance.
Have a 4.0 RC 6 or previous 4.0 RC or Beta version which does not have com_search installed.
Update to 4.0.2 or to the latest 4.0 nightly build.
Check if there is an update site with name "Search Update Site" and location "https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml".
Result: There is such a update site.
In the extensions manager, check if there is a package "pkg_search".
Result: There is such a package.
Try to uninstall that package.
Result: It fails because no manifest file found, see section "Actual result BEFORE applying this Pull Request" below.
Update the result from the previous Test 1 to the patched package or custom update URL created by drone for this PR.
In the extensions manager, check if there is a package "pkg_search".
Result: There is no such a package.
Check if there is an update site with name "Search Update Site" and location "https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml".
Result: There is no such a update site.
Rebuild update sites and check if there are errors.
Result: No errors related to com_search.
Check again step 3.
Result: There is still no such a update site.
Have a current 3.10.x or 4.0.x which has com_search installed.
Update to the patched package or custom update URL created by drone for this PR.
Check if there is an update site with name "Search Update Site" and location "https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml".
Result: There is such a update site.
In the extensions manager, check if there is a package "pkg_search".
Result: There is such a package.
Uninstall that package.
Result: The package and com_search and all plugins and modules belonging to com_search are uninstalled, and the update site is removed.
After an update from a 4.0 RC 6 or previous 4.0 RC or 4.0 Beta version where com_search was not installed because it was a new installation or where it has been removed after updating from 3.10 to that version, a package "pkg_search" has been added in the database.
When trying to uninstall that obsolete package, you get an error that the manifest file is missing:
When updating an installation where com_search is present, a package "pgk_search" and an update site for that are created in database.
When updating an installation where com_search is not present, no such stuff is created.
When updating a 4.0.0 or later where a package "pgk_search" and an update site for that have been created in database but com_search is not present, these obsolete database records are removed when updating to a future 4.0.x version which contains the changes from this PR.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql |
Labels |
Added:
?
|
Hope, I made everything correct :-)
Confirm Actual Result 4.0.0
Installed Prebuilt Package with this xml: https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/35483/downloads/47337/pr_list.xml
Updated to 4.0.3-dev.
With Patch > Extensions: Manage searched for: "search" > Result: Some Smart-Search.
Under > Update > Extensions: System shows me Update Info for "Search Package".
After Checking above > No Update available.
Message under Update Extensions was then removed.
So, it seems OK, Thanks for checking my steps.
Database Check: 4.0.3-2021-09-04
MySQLi
5.7.33
PHP 7.4.21
I have tested this item
Code inspected. There are no changes since my first test.
To be sure I performed the SQL statement on a J4 database (MariaDB) without errors.
I have tested this item
Works good to me too.
I have tested an update from 3.10 to 4.0 (with and without the patch) as well as an older dev version of 4.0 to this patch.
Status | Pending | ⇒ | Ready to Commit |
Merging now thanks for the tests and the PR
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-09-06 18:43:00 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
|
Thanks for testing.
I have tested this item✅ successfully on dfc469d
Tested on MariaDB
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35483.