1

I'm not sure if it's a good title for my question, because my component actually updates - at least that's what Joomla tells me.

So, the problem is that I developed a component and now I need to update it but it doesn't seem to be updating.

I created a folder called component-update in my root folder. Inside that folder I have:

  1. update.html file containing information about the update.

  2. My zipped component called com_gallery-update-1.9.1

  3. XML updates.xml file containing instructions for the update.

In my updates.xml file I have:

<updates>
    <update>
        <name>Gallery Update</name>
        <description>Gallery Component Update</description>
        <element>com_gallery</element>
        <type>component</type>
        <version>1.9.1</version>
            <infourl>http://localhost/component-update/update.html</infourl>
        <downloads>
            <downloadurl type="full" format="zip">http://localhost/component-update/com_gallery-update-1.9.1.zip</downloadurl>
        </downloads>
    
        <tags>
            <tag>stable</tag>
        </tags>
        <targetplatform name="joomla" version="3.[23456789]" />
        <php_minimum>5.3</php_minimum>
        <supported_databases mysql="5.6.19"></supported_databases>
    </update>
</updates>

In the component's mainfest file I have:

    <updateservers>
      <server type="extension" name="Gallery Updates">http://localhost/component-update/updates.xml</server>
   </updateservers>

On the "Update sites" page, in Joomla Administrator Panel, I have:

Gallery updates

http://localhost/component-update/updates.xml

My component appears on the update list and I'm able to update it; Joomla gives me this:

Message

Updating component was successful

But the component does not change the version and when I click on "Find Updates" I can see my component update again on the list, which means the component wasn't really updated.

I can't tell you what's wrong because it doesn't give me any error message.

I have tried:

  1. Changing folders

  2. Changing XML files

  3. Trying update type collection

  4. Clearing the cache

  5. Reparing database

  6. Rebuilding update sites

  7. Changing names

None of those worked. If someone has experienced this before, please help me.

I'm following along with this tutorial: https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_an_update_server

  • Are the element, type, client_id and folder in that XML the same as in the table #_extensions? You are updating to 1.9.1? What's the current version of your component that you have installed (listed in #_extensions) ? – pe7er Jun 27 at 19:08
  • The current version is 1.9. On my Update list in my adminsitrator panel it shows correctly. Installed version: 1.9 | Available: 1.9.1. I have tried everything. It happens with other components too. Even the Helloworld component from the tutorial. I think there's something wrong with my Joomla. I don't know. Eveyrthing seems to be OK. It's making me sad to be honest. Because I have a component in production. I can't simply reinstall it again. (I'm just testing in localhost). I will be also needing to do a lot of updates. – Thiago Guimarães Jun 27 at 19:12
1

I feel so silly...I just forgot to change the version of the component in the XML mainfest file from 1.9 to 1.9.1. If you are running into the same trouble don't forget to change the version of your component in your component's mainfest XML file.

<version>Updated_version_of_your_component</version>

I had this:

    <name>COM_GALLERY</name>
    <!-- The following elements are optional and free of formatting constraints -->
    <creationDate>03/07/2020</creationDate>
    <author>Author</author>
    <authorEmail>authoremail@gmail.com</authorEmail>
    <authorUrl></authorUrl>
    <copyright>Copyright Info</copyright>
    <license>License Info</license>
    <!--  The version string is recorded in the components table -->
    <version>1.9</version>
    

I changed to this:

    <name>COM_GALLERY</name>
    <!-- The following elements are optional and free of formatting constraints -->
    <creationDate>03/07/2020</creationDate>
    <author>Author</author>
    <authorEmail>authoremail@gmail.com</authorEmail>
    <authorUrl></authorUrl>
    <copyright>Copyright Info</copyright>
    <license>License Info</license>
    <!--  The version string is recorded in the components table -->
    <version>1.9.1</version>
    

More info: https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_an_update_server

| improve this answer | |

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.