Soma Posted October 20, 2011 Share Posted October 20, 2011 Is this possible yet? If I'm editing a page, it shouldn't be editable at the same time by another user, instead show a message. This is a really must have feature not onyl for the project I'm working for a big client. Clients always ask for such things straight away. 1 Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 I agree this should go in the near term roadmap. Though I'm thinking it would just be a warning rather than a lock, i.e. "Warning this page is currently being edited by Soma. You should avoid making edits until Soma is finished." The reason I think a warning rather than a lock is better is because someone may just leave their window open to a page, and we're pretty generous with long session timeouts. 1 Link to comment Share on other sites More sharing options...
apeisa Posted October 20, 2011 Share Posted October 20, 2011 Versions > Lock Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 Versions > Lock Not sure I understand? Link to comment Share on other sites More sharing options...
Soma Posted October 20, 2011 Author Share Posted October 20, 2011 What would be needed / how expensive would it be to make it really lock? The other CMS we're working with does show a message and no edit screen. I think it's done via a flag, that get's set when editing and when leaving/closing browser. If only a message is shown the user doesn't really pay attention? If only having a message, it should be a really clear message or an js alert. Link to comment Share on other sites More sharing options...
apeisa Posted October 20, 2011 Share Posted October 20, 2011 Not sure I understand? When we get versions, then need for locks is smaller. Although there are benefits from locks in that scenario too (no need for merging afterwards). I think ideal solution for locks is that it is a message with notify who is editing + ability to "open the lock" but which requires a click. Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 Yeah I agree, as long as there is a way to override the lock it should be good. i would guess that 50% of the time one sees this message, it would be because of a user that's not really editing the page but just left the window open to it. Though I suppose if we enforced a lock, people would be careful not to do that. The way we can check for an active session is just with some javascript that pings the server every 30 seconds or something like that. That way we can detect of a user still has an active session without relying on the last page request. Link to comment Share on other sites More sharing options...
Soma Posted October 20, 2011 Author Share Posted October 20, 2011 I agree. If you see the page beeing edited by name/email it would be possible to ask the person to close it. In general there's rare cases where one would left it open. But having it still editable and just show a message isn't enough I guess. It would be like if you go on a water closet and there would be no lock, just a message at the door. Just have it fool-proof, so no worst case scenarios are possible at all. Versioning does help to get it fixed, I agree but still it should not rely on such things just cause it's possible. For me this would be all good and no problem, but you know how clients are that consider them big and important (cause they're trade market). Link to comment Share on other sites More sharing options...
Pete Posted October 20, 2011 Share Posted October 20, 2011 Locks are a big headache for me in MODx (well, bigger with more admin users) as it only takes someone to close their browser and the page remains locked. I think several options should be available for such a module - show warning only, lock page, and finally option to lock page but have certain users/user levels be able to override a lock (so "Ryan is currently editing the page "Pw 3.0 roadmap. Are you sure you want to continue and edit this page?"). Just a few ideas. In MODx you have to go to Tools -> Remove Locks to get around this and It removes all page locks which wouldn't be good if you had lots of users with the ability to edit content Link to comment Share on other sites More sharing options...
apeisa Posted October 20, 2011 Share Posted October 20, 2011 I think several options should be available for such a module - show warning only, lock page, and finally option to lock page but have certain users/user levels be able to override a lock. I slightly disagree. One way (=best) how it works and one setting: on / off This is feature that is not relevant for all sites (I might say that probably only for 20% of sites or something). Many many sites have only one or few editors and they edit certain areas of sites each. So many times it causes more trouble than it solves. Although in some cases and organisations this can be very beneficial. But I think it should always be something that everyone with edit access can open. Link to comment Share on other sites More sharing options...
Soma Posted October 20, 2011 Author Share Posted October 20, 2011 It does lock it in the CMS we use and no wa to unlock it till the other closes browser or page. This has never ever caused problem but prevented them. For our clients and projects it's a needed feature 100% of the time, because there large group of editors having access to same pages, often it would be overkill or even not possible to manage access for each page seperate. I agree that it doesn't happen often but when... We or I would even sponsor it if needed. Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 I think we'll be able to build this as a module, which will solve the on/off thing. Just need to think more about how best to implement. Link to comment Share on other sites More sharing options...
apeisa Posted October 20, 2011 Share Posted October 20, 2011 It does lock it in the CMS we use and no wa to unlock it till the other closes browser or page. This has never ever caused problem but prevented them. For our clients and projects it's a needed feature 100% of the time, because there large group of editors having access to same pages, often it would be overkill or even not possible to manage access for each page seperate. I agree that it doesn't happen often but when... Interesting to know that you have had exact the opposite experiences with this. Document management system that we use internally has this kind of lock in (only person who edits or admin can release files ) and that is major pain in the ass. Gotta admit that it is different kind of beast since it integrates into the operating system, and not web service used through browser. What I meant earlier is not that editing is managed for each page separately, but that if each who can have edit access can also release pages (that are locked for someone else). It should be enough in almost every situation. It must be then well known decision - because you need to make action before you can start editing. In other case it might be open computer somewhere (home, work) and person some other place and unable to release it (or just that no one cannot contact that person). That is what happens for us every now and then with our documents.. Locked for person X who doesn't answer his/her phone... I think that risk is even worse than overwritten content. Think of broken link on promoted item on front page, which no one cannot edit etc... I think good idea would be show the exact time when person who has been editing the file has been active. Something like this came into my mind: "This page is under editing by Antti Peisa (email.address@example,com) and locked because of that. Editing has started 3 hours ago (18:45) and Antti was last active 2 hours ago. You can release this page if you need to start editing, but you should contact Antti to make sure that you won't edit same page at the same time." Of course I don't mind having settings and different use cases, but as always I support for simplicity and finding the best way. Too many settings lead to bloat. But after reading Soma's post I think my view might be little bit limited here. Also clients I tend to work are pretty similar organizations - although in many different sizes. Link to comment Share on other sites More sharing options...
Soma Posted October 20, 2011 Author Share Posted October 20, 2011 Thanks for your input apeisa and these are valid things to consider when implementing such a thing. I don't consider this being much configurable, but a moduel sounds great if that would be possible Ryan! Any way I can help, just message me. Mainly The CMS we use has like a time out I think by RPC ping, so not possible to have it locked for any longer than the session time out I guess (not sure really, I never bothered looking at the code). So after not working on for maybe 30min, it will lose connection and page will be unlocked. Link to comment Share on other sites More sharing options...
Pete Posted October 20, 2011 Share Posted October 20, 2011 I think good idea would be show the exact time when person who has been editing the file has been active. Something like this came into my mind: "This page is under editing by Antti Peisa (email.address@example,com) and locked because of that. Editing has started 3 hours ago (18:45) and Antti was last active 2 hours ago. You can release this page if you need to start editing, but you should contact Antti to make sure that you won't edit same page at the same time." That's pretty much what I was thinking above but you explained and expanded on it better Link to comment Share on other sites More sharing options...
ryan Posted October 20, 2011 Share Posted October 20, 2011 That is actually better than what I was thinking, so we should go with that. I've plugged this into the 2.3 roadmap as a reminder, but will likely get it taken care of before then. http://processwire.com/about/roadmap/ Link to comment Share on other sites More sharing options...
slkwrm Posted October 21, 2011 Share Posted October 21, 2011 If it can be implemented as a module, then it could have two options: lock pages and restrict other users from editing lock pages and restrict other users from editing but allow unlocking after confirmation on a warning screen JS timeout approach is the best though Link to comment Share on other sites More sharing options...
Soma Posted June 5, 2012 Author Share Posted June 5, 2012 Just went through this old thread and noticed that there's no link or note here that there is a module for this already. I created the PageEditSoftLock module for this particular problem, with a little help of Ryan to get easy starting. I got it installed in all our PW projects and it won't lock the page completely (still editable) but throw a fat red message and a js alert. It workes very well and has been a saver already a couple times preventing two people editing the same page. It has been released here: http://processwire.c...edit-soft-lock/ 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now