37

I was checking my edits, when I saw this one:

https://stackoverflow.com/review/suggested-edits/20923769

I can't exactly remember what was my edit, but I'm pretty sure (and my edit note says "code formatting") it was just changing a normal text to code. This is the note that I type when I edit from normal text to code.

I'm 100% sure that it's impossible that I've done that huge change, so I suppose something went wrong. Basically, I have no idea where that added part of code came from... for sure not from my keyboard, and can't come from my own code (maybe an old clipboard from my pc) because I've never seen that code before.

I know the "bug" tag says "indicates a reproducible problem on the site", but I think this info could be useful to SO anyway... maybe that happened to someone else, and we can start finding a way to reproduce the problem.

13
  • 29
    Probably edit conflict resolution gone wrong, where you (for example) added code formatting to the post (by indenting with 4 spaces) while the OP removed a bunch of the code, thus making it appear as if you added all that code.
    – user247702
    Commented Sep 24, 2018 at 14:53
  • I thought the same, but if you go to that answer there isn't any edit history ... I should see at least two revision if this case, or am I wrong?
    – Leviand
    Commented Sep 24, 2018 at 14:57
  • 11
    That's the grace period, see Why do we have an edit grace period? for an explanation of what it is and why it exists.
    – user247702
    Commented Sep 24, 2018 at 14:59
  • 2
    Didn't know that. So, shouldn't be more logic to add the post in the review queue only when grace period has ended? I've surely edited that from review section, because I don't follow that tag at all.
    – Leviand
    Commented Sep 24, 2018 at 15:03
  • 2
    Perhaps, yes. We're really in edge case territory here, you're one of the few unlucky victims that run into this. Not the first and certainly not the last to post about it on Meta :)
    – user247702
    Commented Sep 24, 2018 at 15:04
  • 6
    This conflict is well-known, but still reportedly uncommon. Each time we request something like an edit lock, it gets shot down as 'too much of an edge case'. It likely doesn't seem as pressing an issue as it may actually be due to how difficult it is to gather data on this issue (because it's so transient)
    – TylerH
    Commented Sep 25, 2018 at 2:58
  • I don't know what happend but what I'm thinking is, When you edited it, it contained the code (unformatted) and you may accidentally added a space, which formatted it. Then you submitted it for review. After that, the person who answered, removed the code within 5 minute grace period and there is no edit history present. So the original answer will look like it never contained that code, hence the reviewers decided to reject it
    – Sagar V
    Commented Sep 25, 2018 at 3:07
  • @TylerH so basically I just leave this here without any followup? :)
    – Leviand
    Commented Sep 25, 2018 at 8:10
  • 1
    @Leviand Well hopefully someone will see it as it is tagged bug and respond, but that requires a CM or developer to do so. I have added some more tags to help identify the scope of the issue at a glance... hopefully they will see this question.
    – TylerH
    Commented Sep 25, 2018 at 17:16
  • 3
    Don't people who're editing a post get a warning that the post has been changed while they were working on it?
    – Mr Lister
    Commented Sep 25, 2018 at 19:03
  • 1
    @Leviand Just leave it here so it can be ignored like all other bugs decreed to be unimportant edge cases. :/
    – Ian Kemp
    Commented Sep 26, 2018 at 13:38
  • 1
    A similar thing happened to me and can be seen in 11/12/13 in stackoverflow.com/posts/20855353/revisions. I made the small edit I intended to on my phone in 13 and saved it when I had very poor reception, and when I went to look at the post again it looked like I mangled the entire thing.
    – mkobit
    Commented Sep 26, 2018 at 14:21
  • A similar thing happened to me also: meta.stackoverflow.com/q/365715/9254539
    – eesiraed
    Commented Sep 27, 2018 at 0:29

1 Answer 1

14

When you save an edit to a post, the post (or a suggested revision for it) is saved exactly as it was in your edit window. If any changes to it were made in the meantime, they are overwritten.

The diff in the review window, on the other hand, is generated from your revision and the current revision. So, if an edit was made while you were editing the post yourself, the diff is between the post after that edit and the post after your edit.


The OP reports that they sometimes "get blocked with the warning that someone else is editing the same post". This never happened to me (maybe it was added after I hit 2k reputation).

But I do have a possible explanation: this is only checked at the moment when you are entering the edit form, and only if you don't have full editing privileges (have 2k reputation or are the post's author).

So, here, it happened like this:

  1. You entered the edit form -> was allowed
  2. The OP entered the edit form -> wasn't checked
  3. The OP saved their edit (this edited their existing revision instead of creating a new one because less that 5 minutes passed since its creation)
  4. You saved your edit

I guess this is done as an anti-frustration feature. There's no easy way to incorporate changes done by others on the fly, and creating such a way would necessitate a UI for a 3-way merge and conflict resolution, and there doesn't seem to be enough demand for such advanced revision-control features to warrant the added complexity. And of course, you aren't going to deny a post's author editing their own post because someone else has requested an edit form for it!

7
  • 8
    Usually when I try to edit something that is under editing I get blocked with the warning that someone else is editing the same post... if this didn't happened cause of grace period, why can't we just avoid putting these posts into the review queue until the grace period has ended? Looks like a simple solution for this problem to me... BTW: I would call the behaviour that you have explained a bug ^^
    – Leviand
    Commented Sep 26, 2018 at 12:46
  • @Leviand it's not a bug if that's how the system was designed to behave (as it was in this case). For something to be a bug it must be behaving contrary to the design. You could post a feature-request a long the lines of your suggestion.
    – user4639281
    Commented Sep 26, 2018 at 15:13
  • 3
    @TinyGiant this case, for that to be true, someone would have had to sit down and say to themselves "I want the system designed so that if an edit was made while someone was making another edit, then the new edit should falsely claim that the user was editing the most recent version rather than the version they actually started editing". I find it very unlikely that anyone actually designed it that way and I find it more likely that this case wasn't considered and this is just a post-hoc rationalization. Commented Sep 26, 2018 at 19:53
  • 1
    @TinyGiant IOW, I am saying that in all likelihood, the only sense in which it was "designed" to behave that way is in the sense that the system does behave that way; I consider that a crappy use of the word "designed". You're saying it was designed to behave that way and I think that you should have to provide evidence that the person/team that designed the system actually intended for the system to falsely claim that a user made an edit to the most recent version when in fact the user clicked "edit" on a previous version of the question. Commented Sep 26, 2018 at 19:56
  • @Leviand I have an explanation for that, see the update. Commented Sep 26, 2018 at 21:42
  • Mmh is there someone (super - jedi - king in the north user) who can say for sure that there is a different behaviour between < 2k rep users and >2k rep users?
    – Leviand
    Commented Sep 27, 2018 at 8:15
  • @Leviand Developers can, of course. But is that really important? The important thing is, when you save an edit, your version is final. Edit collisions are very rare, the "this post has been edited" banner does a pretty good job of keeping everyone updated. Commented Sep 27, 2018 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .