Caution
Do not use the Alpha Update Server on a production site
For the pre release cycle of Joomla 5.4 and Joomla 6.0 I will maintain "stable" packages for testing the automated update service introduced with Joomla 5.4-alpha1.
Since the automated update mechanism will only update between stable releases it's not possible to test the update mechanism within the pre-release packages (alpha1-3, beta1-2, rc).
For this I create a separate Joomla Update-Package corresponding to each pre-release package as a stable package and publish this package on the Alpha
update repository. This repository is a copy of our tuf update server which hold the information about the available updates.
They are marked as stable packages.
Caution
Once again. Do not use the Alpha Update Server on a production site, it will auto update to your stable site to a pre-release version.
Since it's not possible to switch to this update repository in the Joomla backend, I created a plugin which allows you to switch to the alpha update server
. This can be used in any Joomla 5.0+ version but only make sense if you want to test the auto update server with 5.4.0-alpha1 or 6.0.0-alpha1 and later.
Caution
Do not use this plugin on a production site.
You can download it from here.
The plugin is called "System - Alpha Update " and will automatically activate it self and change the server to the "alpha update server".
It has one option to configure, which "server" you would like to select.
The plugin does 2 things.
administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
#__extensions
Labels |
Added:
No Code Attached Yet
|
My localhost Joomla 5.4.0-alpha1-dev site had Update Source 'Default', and 'Stable'. After I installed the plugin and clicked 'Check for Updates', two error messages were displayed about the time stamp on the updates.
However, after a couple of hours I went back to Joomla! Update. The Dashboard showed that automatic updates were disabled. I enabled them, but got the message "Error while registering to automated update service: Invalid URL: unresolvable site URL. (0)." However, in spite of the error, Joomla! Update tells me "Update your site to "Joomla! 5.4.110."
Was the invalid URL error reported this is just a localhost site? I might create a subdomain on my remote server.
Now I installed Joomla 5.4.0-alpha2-dev on a remote server, test.talikka.com. The initial error messages after turning on the automatic updates were: "Error while registering to automated update service: (0).
Update not possible because the offered update is older than the currently installed version."
However, the plugin did its thing, the token was received and the update server is now pointing to the alpha server. Joomla 5.4.110 is also shown as available. I'll wait and see.
Nothing has happened automatically. The website is still 5.4.0-alpha2-dev. The plugin System - Alpha Update Server is set to 'Alpha Joomla Update Server' and in Update - Joomla - Options the Update Channel is 'Default' and the Minimum Stability is 'Stable'. The tab Austomatic Updates has set Automated Updates to 'Yes' and the Update Token' has a value. The site uses Akeeba Admin Tools, WAF is on and the site uses the Joomla .htaccess file. I will check the log files.
The log files in administrator/logs do not have any unusual messages and no references to 'alpha'. Nothing unusual in Apache logs either. The only references to 'autoupdate' were in reguests "GET /media/plg_quickicon_autoupdate/js/healthcheck.min.js?4c66af HTTP/2" with the HTTP status 304.
I received the normal update notifications by email from the site:
"Joomla! version currently installed: 5.4.0-alpha2-dev
Joomla! version available for installation: 5.4.110"
@SniperSister I went to the Automated Updates tab of Options, turned automated updates off and pressed Save & Close. The error message was displayed: "Error while registering to automated update service: Not found (404)."
Then I logged out, logged back in and went to Options - Automated Updates, turned automated updates on and clicked Save & Close.
"Error while registering to automated update service: (0)."
@toivo can you provide me access to that test site? I would like to double check. You can send me them via mail to david.jardin@community.joomla.org.
@SniperSister just sent you the credentials.
@SniperSister the website sent me the email that it had been updated to Joomla 5.4.110. What stopped the update before?
Great testing 👍 and fixing 👍 – thanks for letting us find this already in Alpha 1
@SniperSister thank you!
I have had successful tests, but without the plugin mentioned here. I've patched the update source URL in database and in the code as described in step 1c of the testing instructions of PR #45143 .
First I have updated 2 copies of my 5.3.1 website to 5.4.0-alpha1. Then I've updated one of them to 6.0.0-alpha 1, all with Live Update and the right update channel (default for 5.4.0-alpha1 and next for 6.0.0-alpha1) and the right minimum stability (development or alpha).
Then I have patched the update source on both sites and have enabled the auto updates.
Then I've logged off and waited.
The 6.0.0-alpha1 site was updated very soon to 6.0.110. The 5.4.0-alpha1 site was updated to 5.4.110 one day later.
In both cases I've received the right success email, and the log files have shown that the update worked fine.
Both sites were set to offline in Global Configuration all the time, so the auto update works also fine for that scenario.
Yesterday I updated my remote test site to Joomla 6.0.0-alpha2-dev through the 'Update & Install' option. A few seconds after midnight UTC the site downloaded the Joomla 6.0.110 update package. Less than a minute later I received an email about the successful update.
Successful tested ✅
Installed the extension 'System - Alpha Update Server' on https://heiko-test.joomla.com, checked the plugin is enabled and 'Update Server 'Alpha Joomla Update Server' is selected. 5.4.110 is offered for manual update. Some hours later the Joomla instance is updated automatically from 5.4.0-alpha1 to 5.4.110 and sent an email.