Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple downloadurl tags in update stream #18553

Closed
wants to merge 3 commits into from
Closed

Support for multiple downloadurl tags in update stream #18553

wants to merge 3 commits into from

Conversation

n-robert
Copy link

@n-robert n-robert commented Nov 11, 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>

Support for multiple downloadurl tags in update stream
@n-robert n-robert changed the title Add files via upload Support for multiple downloadurl tags in update stream Nov 11, 2017
@Septdir
Copy link
Contributor

Septdir commented Nov 11, 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

@laoneo
Copy link
Member

laoneo commented Nov 11, 2017

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

@Septdir
Copy link
Contributor

Septdir commented Nov 11, 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.

@n-robert
Copy link
Author

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

@Septdir
Copy link
Contributor

Septdir commented Nov 11, 2017

@n-robert no errors but
in joomla update

We can't find a download URL

In extensions update:

Invalid extension update

@n-robert
Copy link
Author

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.

@mbabker mbabker closed this Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants