? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
18 Aug 2019

Pull Request for Issue #25920

Summary of Changes

As explained here #25920 we never delete the #__updates table and only add new entries. In some cases this lead to long list of duplicates, especial for language updates with different versions etc. Example:
image

For this reason I propose to make sure, before we checking for new updates on a specific update site, that we remove all updates associated to that update site from the #__updates table. This way we make sure only the latest version is added there and no duplicates should be in the database any more.

Testing Instructions

First Test

Seccond Test

  • Install 3.9.11
  • don't apply this patch
  • install an outdated language pack like this on: https://github.com/joomlagerman/joomla/releases/download/3.9.9v1/de-DE_joomla_lang_full_3.9.9v1.zip
  • check for updates (Extensions -> Mange ->Update)
  • Check the #__updates table
  • notice there is only one entry for the German DE Update.
  • got to #__update_sites table
  • set the last checked timestamp for the language update server to 0 (this way we force the updater to check again)
  • got to the #__updates table and set the version of the found update for the pkg_de-DE to 3.9.10.1 this way we fake that there is a old cached version in the database already.
  • check for updates from the extension manager
  • check the #__updates table again
  • notice there are now two entries for the latest update
  • notice also that Joomla still points to 3.9.10 as latest version.
Third Test

Do the steps of the second test again but now with this patch applied. Please note that there are no duplicate entries in the database anymore and Joomla always points to the latest version.

Expected result

Updates still work than expected

Actual result

Updates work but under some conditions duplicate entries in the #__updates database happend, that never get deleted by Joomla unless you hit the Clear Cache button that in the end just runs a truncate on the table.

Documentation Changes Required

None

d999520 18 Aug 2019 avatar zero-24 phpcs
avatar zero-24 zero-24 - open - 18 Aug 2019
avatar zero-24 zero-24 - change - 18 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Aug 2019
Category Libraries
avatar richard67 richard67 - test_item - 18 Aug 2019 - Tested successfully
avatar richard67
richard67 - comment - 18 Aug 2019

I have tested this item successfully on d999520

Hints for other testers:

You can test also on current staging if you have a cloned GitHub repo, as long as you always properly reset it after each test, i.e. no need to install 3.9.11.

The step "check for updates" in the first tests might require to use the "Clear cache" button in order to find the update.


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

avatar zero-24
zero-24 - comment - 18 Aug 2019

Thanks for your test @richard67 and useful infos for the other testers ?

avatar richard67
richard67 - comment - 18 Aug 2019

Unfortunately we currently have a lack of testers, maybe due to holiday time. So if you have a bit boredom, feel free to test other PR's ?

avatar ChristineWk ChristineWk - test_item - 18 Aug 2019 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 18 Aug 2019

I have tested this item successfully on d999520

Belongs to First Test only :-)

There was already J 3.9.11. Confirm that: "The step "check for updates" in the first tests might require to use the "Clear cache" button in order to find the update".was needed!


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Aug 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Aug 2019

Status "Ready To Commit".

avatar HLeithner HLeithner - change - 19 Aug 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-08-19 09:40:13
Closed_By HLeithner
Labels Added: ? ?
avatar HLeithner HLeithner - close - 19 Aug 2019
avatar HLeithner HLeithner - merge - 19 Aug 2019
avatar HLeithner
HLeithner - comment - 19 Aug 2019

Thanks for keeping the update tables clean.

Add a Comment

Login with GitHub to post a comment