Skip to content

[5.4] Convert TUF update info URL into legacy format#45980

Merged
muhme merged 4 commits intojoomla:5.4-devfrom
SniperSister:54-tuf-infourl
Aug 26, 2025
Merged

[5.4] Convert TUF update info URL into legacy format#45980
muhme merged 4 commits intojoomla:5.4-devfrom
SniperSister:54-tuf-infourl

Conversation

@SniperSister
Copy link
Contributor

Pull Request for Issue #45977

Summary of Changes

The legacy update XML format used a XML attribute per infourl, wheras the JSON-based TUF is using two separate keys. That leads to a different data structure, that had to be converted - this PR adds the conversion logic.

Testing Instructions

  • Install Joomla_5.4.0-beta2-dev+pr.45696-Development-Full_Package.zip
  • Disable Automated Updates and delete Installation folder
  • Installed additional plg_system_autoupdatepreventer and enabled it
  • 'Log Almost Everything' and 'Debug System' enabled
  • Installed 'System - Alpha Update Server' 0.6.1 plugin
  • Check with manual update 'Joomla Update to Joomla! 5.4.113 is available (twice needed)
    • Fixed Database structure
  • Enable Automated Update

Actual result BEFORE applying this Pull Request

PHP Warning

Expected result AFTER applying this Pull Request

No warning

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@exlemor
Copy link

exlemor commented Aug 26, 2025

@SniperSister I am trying to test this PR but your 1st step says:

Download /install: Joomla_5.4.0-beta2-dev+pr.45696-Development-Full_Package.zip, except that PR:
#45696 is Merged so it doesn't seem to allow/have the download page ;(

I found this https://artifacts.joomla.org/drone/joomla/joomla-cms/5.4-dev/45696/downloads/87417/
(which seems to be the most recent (but update version) but I would prefer a confirmation from you)

For others looking for the 2 plugins:
Plugin: plg_system_autoupdatepreventer
Plugin: 'System - Alpha Update Server' 0.6.1 plugin

What PHP warning is expected?
I see some BEFORE and AFTER...

@muhme
Copy link
Contributor

muhme commented Aug 26, 2025

What PHP warning is expected?

[25-Aug-2025 08:50:17 UTC] PHP Warning: Array to string conversion in /var/www/joomla-test.heikol.de/public_html/libraries/src/HTML/HTMLHelper.php on line 327

See the fixed issue and maybe from there the tested PR.

@muhme muhme added the bug label Aug 26, 2025
@muhme
Copy link
Contributor

muhme commented Aug 26, 2025

I have tested this item 🔴 unsuccessfully on 4fdaf73

* Veryfied with new test the PHP error is still logged on enabling and disabling Automated Updates

  • New installation with Joomla_5.4.0-beta2-dev+pr.45980-Development-Full_Package.zip
    • Tested enabling and disabling Automated Updates
    • ✅ The PHP warning 'Array to string conversion' no longer occurs
    • ❌ Two new PHP warnings are logged for each enabling / disabling Automated Updates:
[26-Aug-2025 04:20:07 UTC] PHP Warning:  Attempt to read property "url" on array in /var/www/joomla-test.heikol.de/public_html/libraries/src/Updater/Update.php on line 623
[26-Aug-2025 04:20:07 UTC] PHP Warning:  Attempt to read property "title" on array in /var/www/joomla-test.heikol.de/public_html/libraries/src/Updater/Update.php on line 6241G1G


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

@SniperSister
Copy link
Contributor Author

Fixed @muhme - sorry, my bad, did not commit the final version

@muhme
Copy link
Contributor

muhme commented Aug 26, 2025

I have tested this item ✅ successfully on 58742e1

* New installation with fresh Joomla_5.4.0-beta2-dev+pr.45980-Development-Full_Package.zip

  • Tested enabling and disabling Automated Updates
    • ✅ No PHP warnings
    • ✅ Email still sent 'Your site could not be updated from 5.4.0-beta2-dev+pr.45980 to 5.4.113.'
  • Disabled plg_system_autoupdatepreventer and enabled Automated Updates
    • ✅ Automated Update to 5.4.113, including email
    • ✅ No PHP warnings
    • ✅ Checked administrator/logs/* useful update log messages, no new erros (only known email ERRORS, API Exception "Update stopped by plugin.")

Thank you @SniperSister


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

@exlemor
Copy link

exlemor commented Aug 26, 2025

I have tested this item ✅ successfully on 58742e1

I have successfully test this PR. Thanks @muhme, got the same results as you - I feel better knowing that I had the same and thought I was doing something incorrect but wasn't for once ;) lol.

Thanks @SniperSister for the PR and fixes :)


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

@ChristineWk
Copy link

Unfortunately, I'm too late, as I just noticed.
I've been on part of the instructions earlier...
@SniperSister informed you via email. Thank you.


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 26, 2025
@muhme muhme merged commit 67d279c into joomla:5.4-dev Aug 26, 2025
41 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 26, 2025
@muhme muhme added this to the Joomla! 5.4.0 milestone Aug 26, 2025
@muhme
Copy link
Contributor

muhme commented Aug 26, 2025

Thank you @SniperSister for your contribution. Thank you @richard67 for your support. Thank you @exlemor for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants