7

I am bit confused and need some recommendation for a best approach to setup an update server for a collection of extensions.

I got a component, library and a plugin which I put inside a single package. I got a package xml manifest and also got individual manifest for each component, library and a plugin.

Should I have the Update server at package level as collection? Or should I have update server for each extension?

Any recommendations?

Update (26/01/2016): Gone through this link link and it is not providing me any info regarding package upgrade... Should I go with a collection type???

4

After 3 days of struggle, I am able to find a way for auto update the package. Not sure whether this is the correct way. But it works for my scenario.

Updateservers

Assume my component name is com_mycomponent and I got the mycompnent.xml (manifest) file. In that file update the servers as below. I put the below code after the adminstration tag.

<updateservers>
  <server type="extension" priority="2" name="My Package Updates">http://example.com/update_package.xml</server>
</updateservers>

Yes, I use the component's manifest file to update my package

Create the package

-- pck_mypackage
   -- com_mycomponent.zip
   -- lib_mylibrary.zip
   -- lib_myplugin.zip
-- script.php
-- pck_mypackage.xml

update_package.xml

<updates>
  <update>
    <name>My Package Update</name>
    <description>Some description</description>
    <element>pkg_mypackage</element>
    <client>0</client>
    <type>package</type>
    <version>1.0.1</version>
    <infourl title="Some title">http://www.example.com/</infourl>
    <downloads>
      <downloadurl type="full" format="zip">http://example.com/pkg_mypackage_101.zip</downloadurl>
    </downloads>
    <tags>
      <tag>stable</tag>
    </tags>
    <targetplatform name="joomla" version="3"/>
  </update>
</updates>

Thats all. The updater now looks for the update for the component and actually installs the package.

  • You are correct. When I checked the database #__updates I found all language files with client id 0 so when i included the client part in my xml file it started working. But Joomla docs didnt mention about this. they said client id is only required for modules, templates. I think Joomla Devs need to check their documentation part seriously. – Amit Ray Mar 4 '17 at 12:06
3

You can actually do this using the package extension only (and that'd probably be the best way to do so). Long and short, you've basically got everything right, you should just transfer your <updateservers> element from the component's manifest to the package's.

A couple of examples from my own extension:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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