How to update the plugins

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
jwndev
Posts: 26
Joined: Thu Mar 22, 2012 4:58 pm

How to update the plugins

Post by jwndev » Thu Apr 19, 2012 7:22 pm

Hi guys,

What is the correct way to update the plugin?

Just to unzip it in the plugin folder to overwrite exiting?

thanks,
jwndev

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to update the plugins

Post by Tata » Thu Apr 19, 2012 9:21 pm

Basically that's it. But sometime depends what has been changed. If some files were excluded from new version, then if the old ones remain in plugin folder, it may cause some problems. Therefore it is always better to make a backup of old plugin (ZIPping it), delete it from the installation and unZIP new plugin into /plugins folder.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: How to update the plugins

Post by Gert » Thu Apr 19, 2012 10:25 pm

Hi jwndev,

but be carefully, some plugins have a "data" or "content" folder inside the plugins folderstructure, that you should not overwrite, because in that case your data were overwritten.

My plugins stores their data outside the plugin, in a subfolder of the content folder, so there you can update only the plugins folder (and not the content folder), and the data are not overwritten,

Gert

PS: However, a backup before updating is always a good idea, as Tata wrote ;)
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to update the plugins

Post by cmb » Thu Apr 19, 2012 11:31 pm

Hi jwndev, hi Tata, hi Gert,

unfortunately there's indeed no "foolproof" update possible yet (as it's common for many desktop applications -- e.g. Firefox etc.). The most important thing to keep in mind before any plugin update:
Tata wrote:it is always better to make a backup of old plugin
The "details" depend on the plugin: the most obvious problem are the plugins data (e.g. Advancedform_XH's forms). Several plugins allow to configure the place, where those data will be stored: usually it's a good idea to use this possibility to store the data outside the plugin's folder, so the data won't be overwritten by a new version (*). But typically some problems remain. The most common: config/config.php, css/stylesheet.css and languages/YOUR_LANGUAGE.php. Often these files were customized (as it's possible from CMSimple's back-end), but the modifications will be overwritten by the new version. So you either have to keep the old customized files (risking to miss some new features; in the worst case the new version might not work without these) or to customize the new files again (a DIFF tool might be very useful; but indeed no general advice could be given here).

So, if in doubt, I recommend Tata's suggestion: make a backup, delete the plugin's former version, install the new version, and customize the new version again. If anything doesn't work, just restore the backup, and check out the new version with your modifcations in a testing environment. When everything works as expected, just replace the old version with the new one.

In the "long" run, I hope for an improvement of the procedure of updating plugins. Some basics are already on the way (CMSimple_XH 1.5.x): languages/default.php and config/defaultconfig.php (just rename the "new" config/config.php to config/defaultconfig.php). That's not absolutely foolproof, but might suffice in many cases.

(*): I've just seen Gert's answer. Indeed it's quite helpful, if the data are stored outside the plugin's folder by default. But often it's not neccessary to deliver any plugin data at all. See e.g. Advancedform_XH: while it's in BETA stage (perhaps even RC -- not sure yet), it might be reasonable to ship some demo forms with the plugin. When it turns to a "stable" version, I'm planning to exlude the demo forms from the actual plugin download, and offer them as a separate package. But, however, none of both solutions will help regarding config/config.php, css/stylesheet.css and languages/YOUR_LANGUAGE.php. And sometimes the plugin's data are stored in pagedata.php...

To keep the confusion and source of problems to the minimum:
Gert wrote:PS: However, a backup before updating is always a good idea, as Tata wrote
+ 1
Well, of course anybody is free to ignore this advice -- but don't blame anybody else than yourself, if you'll spend hours on grabbing the content of your website from google's cache after an update has gone wrong (I've did it before -- I can tell you: it's no fun!)

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

jwndev
Posts: 26
Joined: Thu Mar 22, 2012 4:58 pm

Re: How to update the plugins

Post by jwndev » Fri Apr 20, 2012 9:13 pm

Tata wrote:Basically that's it. But sometime depends what has been changed. If some files were excluded from new version, then if the old ones remain in plugin folder, it may cause some problems. Therefore it is always better to make a backup of old plugin (ZIPping it), delete it from the installation and unZIP new plugin into /plugins folder.
Thank you, Tata.

Left old files caused me trouble when I was using another CMS. I'll keep this mind. :)

jwndev
Posts: 26
Joined: Thu Mar 22, 2012 4:58 pm

Re: How to update the plugins

Post by jwndev » Fri Apr 20, 2012 9:14 pm

Gert wrote:Hi jwndev,

but be carefully, some plugins have a "data" or "content" folder inside the plugins folderstructure, that you should not overwrite, because in that case your data were overwritten.

My plugins stores their data outside the plugin, in a subfolder of the content folder, so there you can update only the plugins folder (and not the content folder), and the data are not overwritten,

Gert

PS: However, a backup before updating is always a good idea, as Tata wrote ;)
Thank you, Gert. This is very helpful for preventing losing data.

jwn

jwndev
Posts: 26
Joined: Thu Mar 22, 2012 4:58 pm

Re: How to update the plugins

Post by jwndev » Fri Apr 20, 2012 9:27 pm

cmb wrote:Hi jwndev, hi Tata, hi Gert,

unfortunately there's indeed no "foolproof" update possible yet (as it's common for many desktop applications -- e.g. Firefox etc.). The most important thing to keep in mind before any plugin update:

Christoph
Hi Christoph,

Thanks a lot. You include everything. It's helpful for a newbie like me to know more about this cms. I assume this applies to the update of 'cmsimple_xh' itself.

The foolproof idea and its implementation will be helpful, especially to those who though a change would not cause anything wrong but it turned out it caused catastrophe to the site.

Look forward to its birth.

Thanks again.

jwndev

Post Reply