XH 1.6: add restore functionality

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 1.6: add restore functionality

Post by cmb » Sat Nov 24, 2012 5:56 pm

Hello Community,

in classic CMSimple it was always possible to restore a backup of the content in the backend by simply viewing this backup, copying it to the clipboard and than editing the current content and overwriting it with the clipboard contents. This functionality was removed from CMSimple_XH because of the additional pagedata file.

In CMSimple SE there's an explicit restore functionality, and for XH the Restore_XH plugin is available.

Nevertheless IMO at least a minimal restore possibility should be offered by the core of CMSimple_XH. If the pagedata will be stored in content.htm it's possible to restore backups the way it was possible in classic CMSimple, what would be enough IMO. An extended functionality could still be offered by plugins. But if the pagedata keeps in a separate file, we should consider to add some kind of restore functionality to the core (the one of Restore_XH might be reused).

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6: add restore functionality

Post by svasti » Sat Nov 24, 2012 7:37 pm

+1

manu
Posts: 1091
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6: add restore functionality

Post by manu » Wed Dec 05, 2012 3:53 pm

cmb wrote:If the pagedata will be stored in content.htm it's possible to restore backups the way it was possible in classic CMSimple, what would be enough IMO. An extended functionality could still be offered by plugins. But if the pagedata keeps in a separate file, we should consider to add some kind of restore functionality to the core (the one of Restore_XH might be reused).
The generation backup functionality is one of the major advantages CMSimple has in regard to many bigger CMS System.
Since also the simple user should be able to restore a certain snapshot, IMHO the restore function like restore_XH should be a core function. In addition it would be a supplement if we also could restore single pages the classical way (copy/paste), this is simple but effective for the experienced user.
regards
manu

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

Re: XH 1.6: add restore functionality

Post by cmb » Wed Dec 05, 2012 4:07 pm

manu wrote:Since also the simple user should be able to restore a certain snapshot, IMHO the restore function like restore_XH should be a core function.
I assume you mean, even if the content and pagedata will be stored in a single file, there should a button to restore a backup. Well, why not?
manu wrote:In addition it would be a supplement if we also could restore single pages the classical way (copy/paste), this is simple but effective for the experienced user.
What would require merging content and pagedata.
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1091
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6: add restore functionality

Post by manu » Wed Dec 05, 2012 4:50 pm

cmb wrote:
manu wrote:Since also the simple user should be able to restore a certain snapshot, IMHO the restore function like restore_XH should be a core function.
I assume you mean, even if the content and pagedata will be stored in a single file, there should a button to restore a backup. Well, why not?
Yes. Every user is a beginner one time. Until one gets used to <h1-3>, it's a great help just to restore to the last version with one single click, or do I miss another possibility?
manu wrote:In addition it would be a supplement if we also could restore single pages the classical way (copy/paste), this is simple but effective for the experienced user.
What would require merging content and pagedata.
As I have seen in content.htm, the content & pagedata are close together. For a experienced user it might be a effective task by copy/paste this part into the soucecode of a certain page (needs a passage in the "Advanced" documentation).
manu

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

Re: XH 1.6: add restore functionality

Post by cmb » Thu Dec 06, 2012 2:21 pm

manu wrote:Every user is a beginner one time. Until one gets used to <h1-3>, it's a great help just to restore to the last version with one single click
ACK.
manu wrote:As I have seen in content.htm, the content & pagedata are close together.
You're probably referring to the 1.6wedding dev preview. It's not yet decided, if this will be done so in XH 1.6. But your use case is one of the advantages of this solution.
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.6: add restore functionality

Post by Holger » Fri Dec 07, 2012 12:22 pm

cmb wrote:
manu wrote:Every user is a beginner one time. Until one gets used to <h1-3>, it's a great help just to restore to the last version with one single click

ACK.
+1

Holger

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

Re: XH 1.6: add restore functionality

Post by cmb » Tue Jan 29, 2013 10:50 am

Hello Community,

I've implemented the basic (r458). On the settings page besides each backup there's now a restore button (well, actually it is below; this should be adjusted with CSS). Pressing this button causes the current content to be backed up as usual, and the selected backup to replace the current content.

After the restore a redirect is necessary to cater for the changed content. So it's not possible to emit error resp. success messages directly. Well, in case of errors it's not necessary to redirect, so these could be displayed as usual via e(). But how to handle the success message? Basically it's the same as with saving the configuration, see http://cmsimpleforum.com/viewtopic.php?f=29&t=5567 for further discussion of this issue.
manu wrote:it's a great help just to restore to the last version with one single click
I'm not sure, if a single click is actually the best way. Perhaps we should better add a simple JS confirmation?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: XH 1.6: add restore functionality

Post by cmb » Sun Mar 10, 2013 2:31 pm

BTW: shall we remove the general settings page (it's not obvious that clicking "Settings" directly is possible anyway), and replace it with the backup/view/restore information only (IOW: remove the first part of the page), and make that an additional item under Settings?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6: add restore functionality

Post by svasti » Sun Mar 10, 2013 4:31 pm

May be not necessary to remove it, doesn't hurt, although one doesn't expect it.
However I'd add an item "Backup" to the dropdown list so it's easy to find.

svasti

Post Reply