Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
This question was edited both by Steve Huntsman and me. To me, it looked like he had edited my edit and made it worse, almost an act of vandalism. So I left a seminasty comment about it. But later, it has occurred to me that we were probably editing the question at the same time, and my edit just happened to arrive first. (And so Steve is blameless after all.)
Is there no locking mechanism, or at least a way to warn a user that someone else edited the page? Or perhaps there is such a way, but subject to a race condition?
In electrical engineering you would use a clock and state changes are permitted only when the clock is changing. Thus race conditions are avoided.
But I have no idea whatsoever, for a possible solution in AJAX connections. I am however hopeful it shouldn't be too complicated.
@fpqc. The answering script uses AJAX. That is what I had in mind. When an answer is already posted while you are typing one, then it shows on the screen. This is done via AJAX.
I was thinking that when more than one person is editing, some solution handled by AJAX could be useful.
The original question is slightly different to simultaneously adding comments or answers. When editing a post, then that post ought to be locked so that no-one else can edit it (within some timelimit). That is nothing to do with AJAX or any javascript since the request to edit goes directly to the server as a regular request.
The lock can, of course, be "soft" in that if you try to edit a locked question you get the response "X has been editing this question for N minutes, do you want to break the lock?". That's what the nLab software does.
It's well and good to get feedback that others are entering comments, but my question was about editing questions (and answers). I don't think it should be possible to lock a file for editing (someone might keep such a lock forever), but it certainly ought to be possible to get a warning if someone else is currently editing a post when you hit the edit button. But more importantly, if a someone else has posted an edit between the time you hit edit and the time you submit, the submit should not succeed, at least not without flashing red lights and a siren going off and the new “submit” button making it clear that you are about to overwrite someone else's work. Ideally, you should get to see the changes the other person did, plus your own editing buffer unchanged, and whatever tools will help you merge your own edit with the other person's. That last bit may be quite hard to do, but I think the loud warning is important.
@Steve: Done. I removed my comment as well.
This has been brought up at meta.SO.
1 to 14 of 14