Off-by-one loses latest revision


I’m not sure whether it’s Discourse Shared Edits or the #wiki-posts feature, since both were enabled on this particular post to avoid one editor making others’ changes obsolete.

So one post with both wiki and shared edits enabled…

Bug description

Editor A makes revision 55 and presses “Done”.

Editor B goes straight to the revision history to see changes. Revision count shows 54 / 55, but there is no way to access revision 55. Once editor B has made a change, it was against revision 54, effectively removing revision 55 entirely.

Bug resolution

There is no way to circumvent this. Having multiple editors at once for a single post is not supported by the wiki mode, but shared edits seem to create this bug with wiki revisions. It would be nice to be able to use both (in the way that HedgeDoc does it), or to neutralize potential misfit between the two editing modes.

1 Like

Its a tricky problem, the downside is that this has huge potential to inflate revision counts to huge levels if 2 editors are editing concurrently.

I will see if I can add a site setting to the plugin to ensure disable edit collapsing by multiple users.

1 Like

I think I’ve seen another aspect to this bug - but it might be unrelated.

When Shared Edits is turned on for a post, if it is edited too soon (within 20 seconds or so), then a clash seems to occur where only one or the other edits is saved. In other words, the Shared Edit functionality doesn’t actually kick in despite it appearing to be active. Things get very confusing if either author close and re-enter the post again, with edits appearing and disappearing.

If left alone for a while everything seems to sort itself out (albeit with loss of some content). Perhaps a brief 30 second lock of the posts when shared edits are turned on would prevent this?

1 Like

Yeah notifying and synchronising seems to be the right approach here, agree we should fix


After having this recur today with a well established Shared Edits + Wiki post, it seems that the problem is definitely the interaction between the two functionalities.

I’ve been using Shared Edits for a while between people with admin privileges without this cropping up. It is only when Wiki is enabled on the same post that we have the problem.

The obvious workaroud is to make all involved category moderators or TL4 so Wiki is not needed, but that has consequences.

1 Like

Hm. This seems to be the reason why we loose edits on posts, where shared edits is on on a wiki. I naively used wiki mode to extend the range of allowed editors.
I suppose extending the range of allowed simultaneous editors to all readers without the backup features of wiki mode is not a good idea while other possibilities of backup (like a “Save a revision”-button) are lacking?

1 Like