This project is read-only.

Page locking in N2 CMS

Topics: Developer Forum, Project Management Forum, User Forum
Mar 21, 2009 at 1:47 PM
  Is page locking or check in/checkout possible in N2 CMS?Currently two people can simultaneously edit the page and second person can overwrite the first's save.
  If page locking is possible then how can we implement that in our application?

Mar 21, 2009 at 2:11 PM
N2 uses a very optimistic approach. The last one to save wins and there are no notifications.

It would however be a very nice feature to be able to know when someone else is editing and/or get a warning when someone has changed the page since you started editing it.

The way I see this work would be tiny handler that gets notified periodically when a page is beeing edited (jQuery.get("/edit/notifyEditing.ashx", {selected: "/start"})). There would be a temporary list of pages currently beeing edited. When someone starts editing one of these pages they would se a warning, "This page is already beeing edited by ...".

If you make something like this in the code it would be very welcome addition. It's also possible encapsulate such behaviour in a custom editable that provides this feature without touching /edit.
Mar 21, 2009 at 5:16 PM
Wouldn't it be better to get a notification when publishing a page that has been published after the editor opened it....(and be able to see the newly saved page in a new window).
It would be impossible to know when someone has stopped editing (closing browser for instance)...the suggested way the page could be 'in edit' for ever.
Mar 21, 2009 at 6:09 PM
Good point. It could be enough to store the last saved date and compare it to the date of the item when saving. The big question is what someone would do when presented with this information.
Mar 21, 2009 at 9:55 PM
call the one making the change before they did ;-)

But, sincerely, that's up to them...they are informed that there was a change saved prior to them...It is up to them to react on that.
B.t.w. it would be nice if the notice could come asap...using ajax with a simple check (javascript timer) could do?