Updating modules and plugins

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Updating modules and plugins

Post by rgtr » Thu May 06, 2021 10:01 am

Hi

I now have two extensions - a module and a plugin.

Both use almost identical xml files. The module updates properly in both J3 and J4 even if I publish an update with the same version, but a newer date time stamp. Fantastic !

The plugin declines to update when the version is updated. The code in the xml is as follows ... I have left off the field stuff:

Any help would be appreciated. There are other well used plugins which suffer from the same problem.

I did have a typo in the update link, which I corrected, and which I have checked is now correct in the sql table called "..update_sites". Is there anywhere else that could be causing the problem ?

Interestingly when I "clear cache" and then "find updates", one other plugin says it cannot find the manifest file - but the link quoted is there fine, and my module pops up again for an update, but not the plugin.

In my research I did find a lengthy article on the subject from Akeeba.
https://www.akeeba.com/news/1746-workin ... dater.html

This does not affect me as my stuff is just for my web sites. But as I have made them available [outwith JED], I feel I ought to surface the problem.

Richard

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<extension type="plugin" version="4.1.1" group="content" method="upgrade" client="site">

	<name>          TDOC Google Maps</name>
	<author>        Eur Ing Richard Townsend-Rose</author>
	<creationDate>  04 May 2021</creationDate>
	<copyright>     Copyright (C) 2005 - 2021 Open Source Matters. All rights reserved.</copyright>
	<license>       GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>   richard@tdoc.net</authorEmail>
	<authorUrl>     rgtr.tdocplus.co.uk</authorUrl>
	<version>       4.1.1</version>
	<description>   Plugin to display KML files in Google Maps - Joomla 3.9 and 4. Version 4.1.1 of 4th May 2021</description>

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

<!-- xml file that holds the update information -->
	<updateservers>
		<server type="extension" name="Plugin TDOC Googlemap Update Site">http://www.tdocplus.co.uk/tdoc_j4_dev/tdoc_gmap/tdocgmap_update.xml</server>
	</updateservers>	
... etc
Last edited by pe7er on Sat May 08, 2021 2:59 pm, edited 1 time in total.
Reason: added code tags

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23128
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Updating modules and plugins

Post by pe7er » Sat May 08, 2021 3:12 pm

the .xml manifest of your plugin
The .xml manifest of your plugin states "version 4.1.1".
The update server link in your xml manigest links to http://www.tdocplus.co.uk/tdoc_j4_dev/t ... update.xml

the update .xml on your server
That tdocgmap_update.xml mentions that version <version>4.1.1</version> is available.
Hence, there aren't any updates available so it won't show up in Joomla's available updates.

Furthermore your tdocgmap_update.xml file seems to be missing

Code: Select all

<folder>content</folder>

Not related to your issue, just curious:
Why does your tdocgmap_update.xml file has the comment " load WindowsPowerShell using RUN window" ?
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sat May 08, 2021 3:48 pm

Peter.

Creating an SHA - I put the instructions where is need to the answer. Just a note to me.

On plugin - Google Maps. The prior version is 4.1.0. The new version is 4.1.1.
So the tdocmap.xml has a version of 4.1.1
And the update has a version of 4.1.1
The sites with 4.1.0 do not indicate an update is required ... easy so do it manually.
It is also why I decided to indicate the version and date in the description.

On the module - facebook display. The version is 4.2.3. The prior version was 4.2.2
The sites with 4.2.2 indicate an update is required ... works perfectly.

Being an auld aegit [74 plus 3 heart attacks], I managed to delete the zip and update, so re-uploaded - but also recreated.
The 4.2.2 sites work fine. but the one site where I had already updated so is a 4.2.3 keeps wanting to update from 4.2.3 to 4.2.3 ???

Hope that explains the situation better.

It has been suggested that I put them both on JED, but ..... not entirely happy due to this updating problem.

Richard

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27832
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Updating modules and plugins

Post by Per Yngve Berg » Sat May 08, 2021 6:12 pm

Have you created a package or have you separate entries for site and administrator?

Only the site and not the administrator entry in extensions may have been changed during the update.

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sat May 08, 2021 7:17 pm

Per
I have two totally separate things:
a) a facebook display MODULE
b) a Google Maps KML display PLUGIN.
To make life easy the sample test sites have been redacted again and again.
There is no connection between the two - apart from the fact they run happily on the same web sites !
Richard.

illovo
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Sun Jan 13, 2013 9:30 am
Contact:

Re: Updating modules and plugins

Post by illovo » Sat May 08, 2021 10:03 pm

As pe7er has already said above the folder tag is missing in your update xml. Plugins need it always! You can have plugins with the same name in different groups (first level subfolders in /plugins/). Therefore the folder tag is mandatory.

Modules don't need it because the /modules/ folder is not grouped by subfolders.

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sun May 09, 2021 8:29 am

illovo
Thanks for that.
Just what was needed. Perhaps you could give me a bit more detail.
Altho https://docs.joomla.org/Manifest_files says that it is optional .... and refers to a folder in the zip file ???
Richard

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sun May 09, 2021 8:45 am

Hi
https://www.techfry.com/joomla/joomla-m ... extensions
The specification for the content of an xml file for a plugin is somewhat vague.
The above at least clarifies what the Version is for in the <extension> tag. Seems it is NOT mandatory.
Richard

illovo
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Sun Jan 13, 2013 9:30 am
Contact:

Re: Updating modules and plugins

Post by illovo » Sun May 09, 2021 12:24 pm

rgtr wrote:
Sun May 09, 2021 8:45 am
The above at least clarifies what the Version is for in the <extension> tag. Seems it is NOT mandatory.
Therefore the version attribute has been removed in Joomla 4 for core extensions. Joomla core never needed it and never used it.

illovo
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Sun Jan 13, 2013 9:30 am
Contact:

Re: Updating modules and plugins

Post by illovo » Sun May 09, 2021 12:33 pm

rgtr wrote:
Sun May 09, 2021 8:45 am
Hi
The specification for the content of an xml file for a plugin is somewhat vague.
Here's the specification for update manifests
https://docs.joomla.org/Deploying_an_Update_Server
Important for plugins: Plugins have to include <folder> and <client> elements to work properly

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23128
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Updating modules and plugins

Post by pe7er » Sun May 09, 2021 12:43 pm

Joomla 4 will have a HTTP Security Headers plugin in the core.
The developer created a backport for Joomla 3.
I use it on some sites and the updating mechanism works correctly.

The repo has a XML manifest + update XML: https://github.com/zero-24/plg_system_httpheader
Maybe you could compare your plugin XML manifest code + your update XML with that one...
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sun May 09, 2021 12:48 pm

Hi
Thanks for that.
Will do later - need my afternoon walk to exercise the old heart !
Richard

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 10367
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Updating modules and plugins

Post by sozzled » Sun May 09, 2021 2:28 pm

pe7er wrote:
Sun May 09, 2021 12:43 pm
Joomla 4 will have a HTTP Security Headers plugin in the core.
I understand this feature has been now been removed from J! 4.0.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sun May 09, 2021 2:33 pm

Peter
Adding nothing .. plugin works 100% fine. Its the FB Module is the "sort of problem".
Back to adding new kml maps !
Richard

rgtr
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Updating modules and plugins

Post by rgtr » Sun May 09, 2021 3:56 pm

Hi

What a "gotcha".
One must not have any white space within the <version> tags.
"<version>1.2.3</version>" is NOT the same as a nicely formatted "<version> 1.2.3 </version>"
Both fb module and kml map plugin not only working perfectly, but updating as well.

Thanks for all the help

Richard

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23128
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Updating modules and plugins

Post by pe7er » Sun May 09, 2021 4:56 pm

sozzled wrote:
Sun May 09, 2021 2:28 pm
pe7er wrote:
Sun May 09, 2021 12:43 pm
Joomla 4 will have a HTTP Security Headers plugin in the core.
I understand this feature has been now been removed from J! 4.0.
You might have understood it wrong. The HTTP Security Headers plugin is still in the Joomla 4.0 repo:
https://github.com/joomla/joomla-cms/tr ... ttpheaders
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 10367
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Updating modules and plugins

Post by sozzled » Sun May 09, 2021 7:39 pm

Perhaps a little off-topic from this discussion. You may have also misunderstood, @pe7er, that I understand a decision was made to drop the component that controls this feature from J! 4.0. That's my current understanding.

https://github.com/joomla/joomla-cms/pull/33550

Yes there is a new HttpHeaders plugin for J! 4 but I don't know how that relates to the original question.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23128
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Updating modules and plugins

Post by pe7er » Sun May 09, 2021 8:19 pm

sozzled wrote:
Sun May 09, 2021 7:39 pm
Perhaps a little off-topic from this discussion. You may have also misunderstood, @pe7er, that I understand a decision was made to drop the component that controls this feature from J! 4.0. That's my current understanding.
Ok, no problem that you got it wrong. I understand your confusion.

So to summarize: The Content Security Policy component has been removed.
But it's functionality has been moved to the http security headers plugin that is still available in J! 4.0., see the 4.0-dev branch: https://github.com/joomla/joomla-cms/tr ... ttpheaders
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com


Post Reply

Return to “Extensions for Joomla! 3.x”