Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

001b. Adding an update server and a changelog

Astrid edited this page Oct 17, 2019 · 12 revisions

In this chapter we will ...

Surely you will develop your component further. How do you make sure that your customers always use the latest version? How do they know about an update?

Since Joomla! 2.5.4 there is a possibility in Joomla! to offer updates for extensions. Also, a Joomla! Core Update can be made directly from the back end without having to download and upload the package itself.

This chapter explains how to create and run an update server for your component.

Update Server sounds a bit complicated, basically it's just a URL to an XML file specified in the installation XML file. This XML file then contains a number of details, including the new version and the download URL which Joomla! can read out. If Joomla! finds an update this will be displayed in the back end.

In the next picture you can see this update note in the section Extensions | Update. Since Joomla 4.0, extension developers can leverage the ability of Joomla to read a changelog file and give a visual representation of the changelog. If a given version is not found in the changelog, the changelog button will not be shown. You only see the text N/A.

Extensions  Update

In the next picture there is a changelog for the new version.

Extensions  Update   test   Administration

What has changed in the last update shows you the Manage View in the Extension Manager.

Extensions  Manage   test   Administration

And in the last picture you can see what the changelog looks like.

Extensions  Manage   test   Administration(1)

Joomla! has a built-in update software that allows you to easily update your core Joomla! version. This update mechanism is also available to third-party Joomla! extensions. However, you need to set up an update server.

You can try this out on your local development environment. To do so, you will need a Joomla! site, which will be your site that you are going to try to update the extension on. The update server could be any folder on your local web server.

Install version 1.0.0 of our component. To enable the update manager to be able to check for updates, you need to create a new version.

Newly created or Modified files

Newly created files

administrator/components/com_foos/changelog.xml

administrator/components/com_foos/foo_update.xml

Modified files

administrator/components/com_foos/foos.xml

All changes at a glance

Click here to see all changes compared to the last chapter.

More detailed explanations

Newly created files

administrator/components/com_foos/changelog.xml

<changelogs>
	<changelog>
		<element>com_foos</element>
		<type>component</type>
		<version>1.0.0</version>
		<note>
			<item>Initial Version</item>
		</note>
	</changelog>
	<changelog>
		<element>com_foos</element>
		<type>component</type>
		<version>1.0.1</version>
		<security>
			<item><![CDATA[<p>No security issues.</p>]]></item>
		</security>
		<fix>
			<item>No fix</item>
		</fix>
		<language>
			<item>English</item>
		</language>
		<addition>
			<item>Change log and Update Server added.</item>
		</addition>
		<change>
			<item>No change</item>
		</change>
		<remove>
			<item>No remove</item>
		</remove>
		<note>
			<item>Change log and Update Server added.</item>
		</note>
	</changelog>
</changelogs>

See https://github.com/joomla/joomla-cms/pull/24026 and https://docs.joomla.org/Adding_changelog_to_your_manifest_file for more information concerning the changelog.

administrator/components/com_foos/foo_update.xml

<updates>
    <update>
        <name>com_foos</name>
        <description>This is com_foo</description>
        <element>com_foos</element>
        <type>component</type>
        <version>1.0.1</version>
		<changelogurl>https://raw.githubusercontent.com/astridx/boilerplate/tutorial/changelog.xml</changelogurl>      <infourl title="agosms">https://github.com/astridx/boilerplate/blob/v1.0.1/README.md</infourl>
        <downloads>
            <downloadurl type="full" format="zip">https://github.com/astridx/boilerplate/releases/download/v1.0.1/com_foos-1.0.1.zip</downloadurl>
        </downloads>
        <maintainer>Foo Creator</maintainer>
        <maintainerurl>http://www.example.com</maintainerurl>
        <targetplatform name="joomla" version="4.*"/>
		<php_minimum>7.1</php_minimum>
    </update>
</updates>

Modified files

administrator/components/com_foos/foos.xml

In this file we have to change the version number.

Comparing t1 t1b · astridx boilerplate

File Structure

Example in Joomla 4

Side Note

Why are updates so important?

More information

https://docs.joomla.org/Adding_changelog_to_your_manifest_file

https://github.com/joomla/joomla-cms/pull/24026

https://docs.joomla.org/Adding_changelog_to_your_manifest_file

http://docs.joomla.org/Deploying_an_Update_Server

Payed Components

https://github.com/joomla/joomla-cms/pull/15185

Test your component

Now you can zip all files and install them via Joomla Extension Manager.

Concluding Remark

Now we have . Up to now we have no . We are going to work on this in the next chapter.

Overview of all files