? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
18 Dec 2022

Pull Request for Issue joomla/update.joomla.org#277

Summary of Changes

Make sure we are not using downloadSources from another version

Testing Instructions

Install 4.2.6
set this at you update server: "https://update.joomla.org/core/nightlies/next_minor_list.xml"

Actual result BEFORE applying this Pull Request

Downgrade to 4.0.4

Expected result AFTER applying this Pull Request

Error message "download failed"

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

Analyse

There are two few issues which in combination cause this issue.

  • On this XML we have just one item which do use the new downloadsource tag. (4.0.4)
  • The download URL for the 4.3.0-dev does trigger an 404 as the version has not been reset yet

Said downloadSources object from 4.0.4 will be carried over as its not overwritten by the 4.3.0-dev object as it does not exists there.

Now the seccond issue comes into play as the original download URL is 404 joomla tries an alternative via the downloadsource tag. But that tag is set to 4.0.4 URLs which are valid and cause the issue.

Whith the changes here we make sure that this special tag is not carried over to another version when not overriden.

TBH this code itself is far from ideal and should be rewritten for many reasons, but this here should fix the issue as it is for now.

cc @richard67 @obuisard

avatar joomla-cms-bot joomla-cms-bot - change - 18 Dec 2022
Category Libraries
avatar zero-24 zero-24 - open - 18 Dec 2022
avatar zero-24 zero-24 - change - 18 Dec 2022
Status New Pending
avatar richard67 richard67 - test_item - 18 Dec 2022 - Tested successfully
avatar richard67
richard67 - comment - 18 Dec 2022

I have tested this item successfully on 86d7db1


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

avatar richard67
richard67 - comment - 18 Dec 2022

In addition to the testing instructions, I have tested with success that the update works as well as without this PR when the update URL exists so the 404 redirect doesn't happen. You can use the following download URL for this test: https://test5.richard-fath.de/next_minor_list.xml

avatar zero-24
zero-24 - comment - 18 Dec 2022

Thanks so one more test here so this can be fixed :)

avatar ReLater
ReLater - comment - 18 Dec 2022

Before I confirm as successful (it was).

avatar richard67
richard67 - comment - 18 Dec 2022

Before I confirm as successful (it was).

No. But the links in the next_minor_extension.xml currently don’t work because of wrong package names.

Yes, these will be changed after that PR had been tested so they have the right package names and the live update will work, too.

  • Or does this change really mean that i cannot update from 4.2.x to 4.3.x-dev anymore in the future?

No. Updating from 4.2.x to 4.3.x-dev shall and will be possible when all is fixed.

avatar richard67 richard67 - change - 18 Dec 2022
Labels Added: ?
avatar richard67 richard67 - test_item - 18 Dec 2022 - Tested successfully
avatar richard67
richard67 - comment - 18 Dec 2022

I have tested this item successfully on 80d6776

My previous test is still valid because the change after that was only a fix for a typo in a code comment.


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

avatar zero-24
zero-24 - comment - 18 Dec 2022

Before I confirm as successful (it was).

Its broken since the alpha2 commit: e1812a9 it should have been -dev only. Or the URL on the update server had to be updated too. Works both ways but not how it is now.

But as Richard said the update server stay the same and we will deploy an workaround for existing sites. Can you confirm this issue and the patch? Than we do have two tests and can deploy the workaround.

avatar ReLater ReLater - test_item - 18 Dec 2022 - Tested successfully
avatar ReLater
ReLater - comment - 18 Dec 2022

I have tested this item successfully on 80d6776


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

avatar richard67 richard67 - change - 18 Dec 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 18 Dec 2022

RTC


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

avatar richard67 richard67 - change - 18 Dec 2022
Labels Added: ?
avatar ReLater
ReLater - comment - 18 Dec 2022

@zero-24 @richard67 Thanks for clarification. I had this issue on 2 sites yesterday but didn't check that version was 4.0.4 after update and grumbled and grumbled while debugging and repairing...

For others: You can use Upload & Update meanwhile.

avatar zero-24
zero-24 - comment - 18 Dec 2022

Workaround for the update server prepared here: joomla/update.joomla.org#278 (comment)

avatar zero-24
zero-24 - comment - 18 Dec 2022

Thanks @ReLater took me some debugging too but lucky me i found it :)

avatar richard67
richard67 - comment - 18 Dec 2022

Workaround for the update server prepared here: joomla/update.joomla.org#278 (comment)

@zero24 This fixes only the issue with the downgrade to 4.0.4 for sites which don’t have yet the patch of this PR here, but the wrong URL and package name still needs to be fixed, right?

Unfortunately it‘s already late and I need sleep and gotta work tomorrow, so I can’t test that before tomorrow night.

avatar zero-24
zero-24 - comment - 18 Dec 2022

you are right but with that PR the correct message 'download failed" will be shown. The version.php or the version and Download URLs within the xmls needs to be fixed too.

avatar roland-d roland-d - change - 29 Dec 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-12-29 12:12:46
Closed_By roland-d
avatar roland-d roland-d - close - 29 Dec 2022
avatar roland-d roland-d - merge - 29 Dec 2022
avatar roland-d
roland-d - comment - 29 Dec 2022

Thank you

Add a Comment

Login with GitHub to post a comment