13

In posts where the most recent edit is a rollback, a rollback button appears (example):

Clicking it shows this error:

Related: I can rollback to the most recent revision, but I think this was introduced after the update of the rollback popup, and I can't reproduce the bug anymore.

2
  • 3
    It looks like this has been broken since 2009. The only thing new is that I fixed the bug that was suppressing the error message. Fix in progress. Jan 8, 2021 at 20:28
  • Re "...appears to the most recent edit revision item..."? Do you mean "...appears to be the most recent edit revision item..."? Or "...appears next to the most recent edit revision item..."? Something else? Please respond by editing your question/answer, not here in comments (without "Edit:", "Update:", or similar - the question should appear as if it was written today). Jan 11, 2021 at 18:30

1 Answer 1

6

This will be fixed in the next build.

There are a few scenarios where rollback will fail. One is rolling back to the current revision. Another is rolling back to a revision that exactly matches the current revision.

As such, when we first introduced rollbacks in 2008, we hid the rollback button if:

  • We were looking at the current revisions
  • OR The current revision was "Rollback to Revision N" and we were looking at Revision N.

Less than a year later when we refactored the view, we converted that OR to an AND, meaning we showed the button on every revision except the current one, but also on the current one if it was a rollback.

This probably went under the radar for a decade because we were actually suppressing the error message. This is because, as I recently discovered, zero-change edits execute rollbacks and we didn't want to show errors when they hit these conditions.

The reason the errors are visible now, and probably why this came to your attention, is that I fixed a bug that was hiding "Rollback" in the post menu and made changes to resurface the error message when I was confronted with a button that just wouldn't go away no matter how many times I clicked.

3
  • 2
    When was this rollback button in the post menu added, and later de-implemented? I can't find any posts here documenting it, not even a bug report asking about its removal. How did it surface? Jan 11, 2021 at 18:41
  • @SonictheCuriouserHedgehog That's a pretty interesting question. It was added over a decade ago and appears when you're the owner and the post was edited by someone else after you. It was added over a decade ago and I'm not going to jump through git hoops to trace it. The problem was it did Post.Owner == Current.User` which probably broke when we stopped fetching the full owner or a query switched to Dapper. Comparing ids fixed it. Jan 11, 2021 at 21:41
  • @SonictheCuriouserHedgehog As for how it surfaced, I found out it wasn't being rendered when trying to test the new post menu code. My attempt to just completely delete it got overruled in code review, so here we are. Jan 11, 2021 at 21:43

You must log in to answer this question.

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