4

I'm trying to get an update server going, but I'm just not succeeding. I've instrumented the Joomla update code, and it's finding the update on my server, and it identifies it as an update, but it's failing in the step where it matches up the found update to an installed extension. I'm actually trying to do a "package".

Are updates supported for packages? I'm just checking because I know that there are things like uninstall SQL scripts that aren't supported across all extension types.

Does anyone know of a non-trivial package that has auto-updates I could disassemble and look at?

  • Could you provide the code from your extension's XML file and the code from the XML file on your server? – Lodder Apr 7 '16 at 8:29
1

I'll take a wild guess before you reply to my comment above. In your extension's update XML file, perhaps you have set the type attribute incorrectly for the update server. As it's a package you wish to update, the type needs to be set to collection:

<updateservers>
    <server type="collection" priority="1" name="My Extension Name">http://example.com/update.xml</server>
</updateservers>
  • It would follow logically then that I have to do updates on all 3 of my extensions and create corresponding update blocks and files. What a huge pain. – George Sexton Apr 7 '16 at 19:48
1

That got me on the right track. It's a little non-intuitive that you can't use extension for package. Here's what I ended up with that works.

First, the package manfiest

   <updateservers>
            <server type="collection" priority="1" name="Connect Daily Update Site">http://www.connectdaily.com/joomla/updates/package.xml</server>
    </updateservers>

Now, in package.xml

<extensionset name="Connect Daily" description="Connect Daily Events Calendar System">
 <extension name="Connect Daily Package"   element="pkg_connectdaily"     type="package"   version="0.9.2" detailsurl="http://www.connectdaily.com/joomla/updates/pkg.xml"/>
</extensionset>

finally, pkg.xml

<updates>
    <update>
            <name>Connect Daily</name>
            <description>Connect Daily Events Calendar System</description>
            <element>connectdaily</element>
            <type>package</type>
            <version>0.9.2</version>
            <infourl title="Connect Daily">http://www.connectdaily.com/joomla/</infourl>
            <downloads>
                    <downloadurl type="upgrade" format="zip">http://www.connectdaily.com/joomla/updates/pkg_connectdaily-0.9.2.zip</downloadurl>
            </downloads>
            <tags>
                    <tag>stable</tag>
            </tags>
            <maintainer>George Sexton</maintainer>
            <maintainerurl>http://www.connectdaily.com/</maintainerurl>
            <section>Updates</section>
            <targetplatform name="joomla" version="3.[23456789]"/>
    </update>
</updates>

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.