Joomla one click updates in extension manager does not work for plugins

I developed Comparison Table plugin for Joomla. It has also one click update functionality but getting it work was quite a lot of work and debugging core joomla source code.

Official documentation for updateservers is here http://docs.joomla.org/Deploying_an_Update_Server

To make it short you must add updateservers tag to yuour plugin/component/module XML file

    <updateservers>
        <server type="extension" priority="1" name="Comparison Table updates">http://marguspala.com/joomla/comparisontable_update.xml</server>
    </updateservers>

Next you need to put together update XML. Required tags there are name, element, type, folder(for plugins), downloads, and version. Element must contain very same text as you have in install XML package files in main filename plugin/module/component value.

        <files>
            <filename plugin="comparisontable">comparisontable.php</filename>
        </files>

If you still get “There are no updates available at the moment. Please check again later.” then here is a few hints for debugging:Get values from your update XML and execute following query in MySQL or find values from db and add these values to your XML. This query looks for Joomla extension that needs to be updated. Although client_id is used in this query it is still optional.

select extension_id, element from asdfg_extensions where type="plugin" and folder="content" and client_id="0" and element="comparisontable";
select * element from asdfg_extensions

Make sure you have update tag in updates for each targetplatform.

Check your update server access_log if joomla requests and gets update XML.

Advanced: Edit libraries/joomla/updater/updater.php and add debug messages to see where situation goes bad. Plain echo does not always work and be visible in core Joomla functions.

JError::raiseWarning('101', "debug message");

Full update XML here that works.

<updates>
    <update>
        <name>Content - Comparison Table</name>
        <element>comparisontable</element>
        <type>plugin</type>
        <folder>content</folder>
        <client_id>0</client_id>
        <version>5.5.5</version>
        <infourl title="Comparison table">http://www.marguspala.com/comparison-table-plugin-for-joomla</infourl>
        <downloads>
            <downloadurl format="zip" type="full">http://marguspala.com/joomla/comparisontable.zip</downloadurl>
        </downloads>
        <maintainer>Margus Pala</maintainer>
        <maintainerurl>http://marguspala.com</maintainerurl>
        <targetplatform version="1.6" name="joomla">
        </targetplatform>
    </update>

    <update>
        <name>Content - Comparison Table</name>
        <element>comparisontable</element>
        <type>plugin</type>
        <folder>content</folder>
        <client_id>0</client_id>
        <version>5.5.5</version>
        <infourl title="Comparison table">http://www.marguspala.com/comparison-table-plugin-for-joomla</infourl>
        <downloads>
            <downloadurl format="zip" type="full">http://marguspala.com/joomla/comparisontable.zip</downloadurl>
        </downloads>
        <maintainer>Margus Pala</maintainer>
        <maintainerurl>http://marguspala.com</maintainerurl>
        <targetplatform version="1.7" name="joomla">
        </targetplatform>
    </update>
</updates>

Also install XML that uses this update XML

<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="content">
        <name>Content - Comparison Table</name>
        <author>Margus Pala</author>
        <version>0.9.1</version>
        <description>Simple way to show product comparison tables. see http://marguspala.com</description>
        <authorUrl>http://marguspala.com</authorUrl>
    <license>GNU General Public License version 2 or later</license>
        <files>
            <filename plugin="comparisontable">comparisontable.php</filename>
            <filename>js/index.html</filename>
            <filename>js/compare.js</filename>
        </files>
    <!-- Joomla! 1.5 uses params -->
    <params>
            <param name="num_cols" type="text" default="6" label="Cols in selectiontable" description="How many columns must there be in table for selecting visible columns" />
            <param name="max_cols" type="text" default="5" label="Max products to compare" description="When this number of products have been chosen no more can be selected" />
    </params>
    <!-- Joomla! 1.6 uses fieldset -->
        <config>
                <fields name="params">
                        <fieldset name="Article" label="Parameters">
                                <field name="num_cols" type="number" default="6" label="Cols in selectiontable" description="How many columns must there be in table for selecting visible columns" />
                                <field name="max_cols" type="number" default="5" label="Max products to compare" description="When this number of products have been chosen no more can be selected" />
                        </fieldset>
                </fields>
        </config>

    <updateservers>
        <server type="extension" priority="1" name="Comparison Table updates">http://marguspala.com/joomla/comparisontable_update.xml</server>
    </updateservers>
</install>

asd


1 thought on “Joomla one click updates in extension manager does not work for plugins

  1. Sorry – it removed the tags.

    “client_id” is not working anymore use “client” instead.

    – Michael

Leave a Reply

Your email address will not be published.


*