? ? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
5 Jan 2020

Pull Request for Issue #27319 .

Summary of Changes

This Pull Request (PR) extends the pre-update checker for extensions in the Joomla Update Component so it can handle extension set XML files (i.e. update sites of type "collection"), too.

Not sure if this is the most elegant way to fix the issue, but I've tried to do it with little impact on existing code.

Testing Instructions

  1. On a clean 3.10-dev branch or latest 3.10 nightly build, go to the "Server" section of Global Configuration and set "Error Reporting" to "Maximum" or "Development".
  2. Install @zero-24 's extension "JUEP für Joomla 3" using the zip file from following download: JUEP.fur.Joomla.3.zip.
  3. Go to the Joomla Update Component's options and change the update channel to "Custom URL".
  4. Enter the update URL for the 4.0 nightlies as custom URL: https://update.joomla.org/core/nightlies/next_major_list.xml.
  5. Select "Save & Close".
  6. Scroll down to the "Extensions Pre-Update Check" section.
    Result: Unknown error shown in column "Compatibility", see section "Actual result" below.
  7. Check PHP log.
    Result: PHP warning, see section "Actual result" below.
  8. Apply the patch of this PR.
  9. Reload or go again to the Joomla Update Component page and check again the "Extensions Pre-Update Check" section.
    Result: The installed version of the extension is shown as not compatible with 4.0, see "Case 1" in section "Expected result" below. The PHP log doesn't show the warning mentioned in section "Actual result" below.
  10. Check the update sites for the extension .
    Result: There are 2 updates sites with name "JUEP Updates" for extension "System - Joomla Update Email Plugin":
  • 1st update site with URL https://www.jah-tz.de/downloads/extensions/juep/update.xml - this is an extension set XML, and the type of the update site is "collection" (not visible in the Update Sites view in backend but in database and in the extensions's XML file plugins/system/updateemail/updateemail.xml).
  • 2nd update site with URL http://www.jah-tz.de/downloads/extensions/juep/sts/update.xml - this is a "normal" (i.e. not extension set) XML, and the type of the update site is "extension" (not visible in the Update Sites view in backend but in database and in the extensions's XML file plugins/system/updateemail/updateemail.xml).
  1. Using tools like e.g. PhpMyAdmin or PhpPgAdmin (depending on your db type), change the URL of the 1st update site in field location of the #__update_sites table to https://test5.richard-fath.de/test-pr27410_update.xml. This will make it point to a modified extension set xml file so that the target platform version of the extension's current version is 4.0, and this points then to an update XML also having a target platform version of 4.0 for the extension's current version.
  2. Reload the Joomla Update Component page and check again the "Extensions Pre-Update Check" section.
    Result: The installed version of the extension is shown as compatible with 4.0, see "Case 2" in section "Expected result" below. The PHP log doesn't show the warning mentioned in section "Actual result" below.
  3. Change in database the URL of the 1st update site in field location of the #__update_sites table to https://test5.richard-fath.de/test-pr27410_update_2.xml. This will make it point to a modified extension set xml file so that the target platform version of an available update for the extension is 4.0, and this points then to an update XML also having a target platform version of 4.0.
  4. Reload the Joomla Update Component page and check again the "Extensions Pre-Update Check" section.
    Result: An available update version of the extension is shown as compatible with 4.0, see "Case 3" in section "Expected result" below. The PHP log doesn't show the warning mentioned in section "Actual result" below.
  5. Change in database the URL of the 1st update site in field location of the #__update_sites table to like it was at the beginning, i.e. https://www.jah-tz.de/downloads/extensions/juep/update.xml.
  6. Change in database the URL of the 2nd update site in field location of the #__update_sites table to https://test5.richard-fath.de/test-pr27410_update-sts.xml This is a modified "normal" update xml with an available target platform version 4.0 for the extension's current version.
  7. Reload the Joomla Update Component page and check again the "Extensions Pre-Update Check" section.
    Result: The installed version of the extension is shown as compatible with 4.0, see "Case 2" in section "Expected result" below. The PHP log doesn't show anything new.
  8. Change in database the URL of the 2nd update site in field location of the #__update_sites table to https://test5.richard-fath.de/test-pr27410_update-sts_2.xml This is a modified "normal" update xml with an available target platform version 4.0 for an available update for the extension.
  9. Reload the Joomla Update Component page and check again the "Extensions Pre-Update Check" section.
    Result: An available update version of the extension is shown as compatible with 4.0, see "Case 3" in section "Expected result" below.

Expected result

Case 1. For an extension with installed version not compatible to 4.0 and no compatible update available:
snap-02

Case 2. For an extension with installed version compatible to 4.0:
snap-03

Case 3. For an extension with installed version not compatible to 4.0 but a compatible update available:
snap-04

In all cases: The pre-update checker can handle extension set update servers. The PHP log doesn't show the warning mentioned in section "Actual result" below. For "normal" (i.e. not extension set) update servers everything works with this PR as well as without it.

Actual result

The pre-update checker can not handle extension set update servers:

snap-01

In PHP log: PHP Warning: Creating default object from empty value in /home/richard/lamp/public_html/joomla-cms-3.10-dev/libraries/src/Updater/Update.php on line 297

Aditional information

The pre-update checker currently doesn't care if an update site is enabled or not, it uses it anyway for the checks. This PR here doesn't change that.

I don't know if this is intended or if it's a bug. If it's a bug, a new issue should be opened and/or a new PR should be made.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jan 2020
Category Administration com_joomlaupdate
avatar richard67 richard67 - change - 5 Jan 2020
Labels Added: ?
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67 richard67 - change - 5 Jan 2020
Title
[3.10] [WiP] Add extension set support to the Joomla Update Component's pre-update checker for extensions
[3.10] Add extension set support to the Joomla Update Component's pre-update checker for extensions
avatar richard67 richard67 - edited - 5 Jan 2020
avatar richard67
richard67 - comment - 5 Jan 2020

Added the "Release Blocker" lables because the issue solved by this PR has that label, too.

avatar zero-24 zero-24 - change - 11 Jan 2020
Labels Added: ?
avatar zero-24 zero-24 - test_item - 11 Jan 2020 - Tested successfully
avatar zero-24
zero-24 - comment - 11 Jan 2020

I have tested this item successfully on 6f83103

works good to me thanks @richard67


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

avatar jwaisner jwaisner - test_item - 11 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 11 Jan 2020

I have tested this item successfully on 6f83103


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

avatar richard67 richard67 - change - 11 Jan 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 11 Jan 2020

RTC


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

avatar richard67
richard67 - comment - 11 Jan 2020

Thanks for testing.

avatar infograf768 infograf768 - change - 20 Jan 2020
Labels Added: ?
avatar wilsonge wilsonge - change - 21 Jan 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-01-21 11:44:09
Closed_By wilsonge
avatar wilsonge wilsonge - close - 21 Jan 2020
avatar wilsonge wilsonge - merge - 21 Jan 2020
avatar wilsonge
wilsonge - comment - 21 Jan 2020

Thanks!

avatar richard67
richard67 - comment - 21 Jan 2020

Thanks, too.

Add a Comment

Login with GitHub to post a comment