1

When rolling out an update for an extension, one must of course define the new version in the Update XML file located on the server, like so:

<update>
  <name>JJ Shoutbox</name>
  <description>JJ Shoutbox</description>
  <element>mod_shoutbox</element>
  <type>module</type>
  <version>4.0.3</version>
  <downloads>
    <downloadurl type="full" format="zip">PATH_TO_FILE</downloadurl>
  </downloads> 
  <maintainer>JoomJunk</maintainer>
  <maintainerurl>http://www.joomjunk.co.uk</maintainerurl>
  <targetplatform name="joomla" version="3.3"/>
  <client>0</client>
  <client_id>0</client_id>
</update>

Normally, what I do is, for every version, I duplicate the above code. As you can imagine, the more updates release, the longer the XML file becomes.

My question is, do I have to duplicate the above code for each release, or do I only need to define it for the latest version?

1 Answer 1

2

Joomla Installer iterates through all XML update nodes, looking for the latest matching version. It does not remembers previous valued from the "head" note. In addition, when the Installer adapter install the extensions, it reads all values from the node. Thus, it is not possible to optimize the XML file.

As a best practice, I recommend to work with a Joomla download manager that creates XML update files. In my operation, I work with Akeeba Releases.

5
  • 1
    Thank for the answer Anibal. So I don't need to use the <update> tags for every version then? Just had a look at the Joomla CMS update manifest and they don't appear to be doing it either.
    – Lodder
    Jul 27, 2015 at 8:18
  • 1
    Each extension can have its own separate file. If you are generating the XML file manually, it is easier for you. With ARS, you define Update Streams, one for each category.
    – Anibal
    Jul 27, 2015 at 8:30
  • 1
    Sorry maybe I wasn't clear. I'm referring to only 1 extension that uses 1 XML file. So for each release (1.0, 2.0, 3.0), do I need to define the <update> tag for each of these versions and continuously store them in the XML file? Or can I simply use 1 <update> tag with the latest version defined? (Not using ARS by the way)
    – Lodder
    Jul 27, 2015 at 8:47
  • 1
    Yes, I think you can leave the latest node, for each supported Joomla version.
    – Anibal
    Jul 27, 2015 at 9:35
  • 1
    Ahh ok thank you
    – Lodder
    Jul 27, 2015 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.