? Pending

User tests: Successful: Unsuccessful:

avatar n-robert
n-robert
11 Nov 2017

Support for multiple downloadurl tags in update stream

Pull Request for Issue #18543.

Summary of Changes

Implements multiple downloadurl tags support for the element in the update server definition without coming up with a new name for each tag.

Testing Instructions

For testing purposes only!

Expected result

Joomla\CMS\Updater\Update searches for an actual download URL and passes it to com_joomlaupdate. If such server is not found, the first URL in the list will be passed.

Documentation Changes Required

Attention: all downloadurls in this XML are fake! Feel free to add your own or you'll get warnings like "We can't find a download URL" or "Invalid extension update".

The update server definition should look like this:

<?xml version="1.0" ?>
<updates>
	<update>
		<name>Joomla! 3.8</name>
		<description>Joomla! CMS</description>
		<element>joomla</element>
		<type>file</type>
		<version>3.8.3</version>
		<infourl title="Joomla!">https://www.joomla.org/announcements/release-news/5716-joomla-3-8-2-release.html</infourl>
		<downloads>
			<downloadurl type="full" format="zip">
				https://downloads.joomla.org/cms/joomla3/3-8-3/Joomla_3.8.3-Stable-Update_Package.zip
			</downloadurl>
			<downloadurl type="full1" format="zip">
				https://downloads.joomla.org/cms/joomla3/3-8-3/Joomla_3.8.3-Stable-Update_Package1.zip
			</downloadurl>
			<downloadurl type="full2" format="zip">
				https://downloads.joomla.org/cms/joomla3/3-8-3/Joomla_3.8.3-Stable-Update_Package2.zip
			</downloadurl>
			<downloadurl type="full3" format="zip">
				https://downloads.joomla.org/cms/joomla3/3-8-3/Joomla_3.8.3-Stable-Update_Package3.zip
			</downloadurl>
		</downloads>
		<tags>
			<tag>stable</tag>
		</tags>
		<maintainer>Joomla! PLT</maintainer>
		<maintainerurl>https://www.joomla.org</maintainerurl>
		<section>STS</section>
		<targetplatform name="joomla" version="3.[78]"/>
		<php_minimum>5.3.10</php_minimum>
	</update>
<updates>
avatar n-robert n-robert - open - 11 Nov 2017
avatar n-robert n-robert - change - 11 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2017
Category Libraries
avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar n-robert n-robert - change - 11 Nov 2017
Title
Add files via upload
Support for multiple downloadurl tags in update stream
avatar n-robert n-robert - edited - 11 Nov 2017
avatar Septdir
Septdir - comment - 11 Nov 2017

Don't work You tried to test if the first server is unavailable
Error

Server

<?xml version="1.0" ?>
<updates>
	<update>
		<name>Joomla! 3.8</name>
		<description>Joomla! 3.8 CMS</description>
		<element>joomla</element>
		<type>file</type>
		<version>3.8.3</version>
		<infourl title="Joomla!">https://www.joomla.org/announcements/release-news/5716-joomla-3-8-2-release.html
		</infourl>
		<downloads>
			<downloadurl type="full" format="zip">https://downloads.joomla.org/fail.zip</downloadurl>
			<downloadurl type="full" format="zip">https://downloads.joomla.org/cms/joomla3/3-8-2/Joomla_3.8.2-Stable-Update_Package.zip</downloadurl>
			<downloadurl type="full" format="zip">https://github.com/joomla/joomla-cms/releases/download/3.8.2/Joomla_3.8.2-Stable-Update_Package.zip</downloadurl>
			<downloadurl type="full" format="zip">https://downloads.joomla.org/fail2.zip</downloadurl>
			<downloadurl type="full" format="zip">https://downloads.joomla.org/fail3.zip</downloadurl>
		</downloads>
		<tags>
			<tag>stable</tag>
		</tags>
		<maintainer>Joomla! PLT</maintainer>
		<maintainerurl>https://www.joomla.org</maintainerurl>
		<section>STS</section>
		<targetplatform name="joomla" version="3.[78]"/>
		<php_minimum>5.3.10</php_minimum>
	</update>
</update

And if default joomla update server
Error

avatar laoneo
laoneo - comment - 11 Nov 2017

Whats the difference in this pr to the functionality of #18547?

avatar Septdir
Septdir - comment - 11 Nov 2017

@laoneo Difference in implementation. In #18547 I add to the mirror to update object (mirror0 mirror1 etc) without affecting downloadurl, and I use only in that case there was no way to download the file from the first downloadurl. In this case, @n-robert tries to initially create an array of downloadurl.

But this PR (#18553) gives me an error.

avatar n-robert n-robert - change - 11 Nov 2017
Labels Added: ?
avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar n-robert
n-robert - comment - 11 Nov 2017

Sorry, it's my fault: URLs were invalid.

avatar Septdir
Septdir - comment - 11 Nov 2017

@n-robert no errors but
in joomla update

We can't find a download URL

In extensions update:

Invalid extension update

avatar n-robert
n-robert - comment - 11 Nov 2017

Yes, I know. I've got no ability to create a mirror server. The update server definition is just an example. Feel free to add your own into <downloadurl> tag.

avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar n-robert n-robert - change - 11 Nov 2017
The description was changed
avatar n-robert n-robert - edited - 11 Nov 2017
avatar mbabker mbabker - change - 2 Dec 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-12-02 19:11:19
Closed_By mbabker
avatar mbabker mbabker - close - 2 Dec 2017

Add a Comment

Login with GitHub to post a comment