Group Docs Locked
I'm noticing that multiple docs (I'd guess all) in the JITP group (http://commons.gc.cuny.edu/groups/journal-of-interactive-technology-and-pedagogy/) are locked, purportedly because they are being edited by Luke. I'm guessing that this is a bug, though it's possible that Luke is editing multiple docs at once. I unlocked the first doc, but this seems like it could be a larger bug. Hence the ticket.
#1 Updated by Boone Gorges over 9 years ago
- Status changed from Assigned to Reporter Feedback
I was only able to find three that were locked. It's probably because Luke opened them to edit, and then closed the browser window without hitting Save. See also https://github.com/boonebgorges/buddypress-docs/issues/44
#3 Updated by Matt Gold over 9 years ago
Just found another example, where I'm told that a doc is being edited by you. Please see attached screenshot.
Question: is there any way of querying the database to see which/how many docs are currently locked?
#4 Updated by Matt Gold over 9 years ago
- File Screen_Shot_2012-04-03_at_10.44.21_PM.png Screen_Shot_2012-04-03_at_10.44.21_PM.png added
- Status changed from Rejected to Assigned
- Target version changed from 1.3.4 to 1.3.11
Seeing this in another group (CAC Planning) -- the email doc appears to be locked and I don't think it should be. Please see attached screenshot.
#5 Updated by Boone Gorges over 9 years ago
- Status changed from Assigned to Reporter Feedback
I've added Scott as a watcher. Scott, is there any chance that you clicked on the Edit mode of the Doc in question, and then left without saving (either by clicking the Back button or by closing the window)? If so, then this can be chalked up to a limitation in the way that the lock is implemented, and I'm going to move this ticket to 1.4 for a fix, as it will be substantial. If not, then it means that the lock mechanism is not even working as advertised.
#7 Updated by Matt Gold over 9 years ago
Just received another report of this -- in this group, the "Journals of Interest" doc is locked (another member tells me there is an alert saying that I'm editing it). I did edit the document a few days ago, but I always save before closing the browser window. http://commons.gc.cuny.edu/groups/journal-of-interactive-technology-and-pedagogy/docs/journals-of-interest
Before forcing the document open, I wanted to report the problem. Please, though, tell me when it's okay to release the lock since we do actually want to edit the doc. Thanks.
#8 Updated by Boone Gorges over 9 years ago
Feel free to unlock the document. There's not much information I can gather, other than that it's marked as locked by you.
You'll have to let me know how you want to progress with this issue. The problem probably will not be fixed until I find the time to totally rewrite the Doc lock mechanism. I had been planning on doing this for the 1.4 release, but this release is not imminent. I can rearrange my schedule to make the lock rewrite a top priority. Or I can disable the edit-lock feature until it's been fixed. Or I can do nothing, and we handle these issues on a case-by-case basis.
My recommendation is to wait, as this does not seem to be a pervasive issue.
#13 Updated by Matt Gold about 9 years ago
Just wanted to note that I'm experiencing this again in another group - http://commons.gc.cuny.edu/groups/arc-inequalities-seminar/docs/what-is-a-massive-open-online-course-mooc
#20 Updated by Boone Gorges over 7 years ago
- Category name changed from BuddyPress (misc) to BuddyPress Docs
- Estimated time changed from 3.00 h to 15.00 h
I'm willing to take a look, but it's going to be a fair amount of work. WP has recently introduced a couple new features that I'd probably leverage (post locking and the heartbeat API) but it will take a good deal of research to reverse engineer those tools. I'll write it first as a feature for mainline BuddyPress Docs, and then port it back to the version that we use on the Commons.
#22 Updated by Boone Gorges over 7 years ago
- Status changed from Assigned to Testing Required
I made some improvements for the latest version of BuddyPress Docs, and have backported them to the Commons in https://github.com/castiron/cac/commit/0363b58f223dde334b7ce70dd3f9064a75fae681
Basic edit lock functionality remains the same: only one user can edit a Doc at a time, and admins have the option of removing an edit lock manually. Otherwise, edit locks are cleared when the Doc is saved, or the user clicks out of edit mode. There is still a 30 minute "idle" window, after which you are automatically removed from Edit mode.
The main change is that a "heartbeat" detector has been introduced. While editing a Doc, your browser communicates every 15 seconds with the server. If WordPress stops receiving these pings - more specifically, if more than 4 pings are missed (one minute) - we assume that the browser window was closed or the connection was lost in some other way, and the edit lock is removed.
The combination of the existing functionality with this new heartbeat ought to catch the vast majority of cases where edit locks are being applied incorrectly.
Ready to test on cdev.gc.cuny.edu.
#23 Updated by Matt Gold over 7 years ago
- Status changed from Testing Required to Assigned
Boone, we just tested this and I am thrilled to say that it worked!!! Please add to the codebase for 1.6
Here's how we tested:
Micki logged in on one computer through the teststudent account, created a doc, and closed browser window while editing
I logged in to cdev and looked at the doc. it showed micki editing it, but then, after 15-20 seconds, the locked cleared.
So this is great. 2 years in the making! So glad to have this fixed. Huge thanks, Boone!!!