When editing a wiki, one edit counts as two

AI-generated summary

Users report a bug where editing a wiki post or title triggers two separate edit history notifications instead of one consolidated entry. Thomas_G first noted that editing a wiki topic generates two edits: the first empty, the second showing the actual edit and reason. He also observed that editing the title via the wiki editor (not the pencil icon) creates two notifications — one for the title change, one for the edit reason — rather than a single unified notification. Pad_Pors clarified this affects all posts, not just wikis, and occurs when edits take longer than 5–10 minutes. osioke confirmed the title-edit issue but couldn’t reproduce the double-edit bug on content, requesting a screencast. Thomas_G provided a video link. riking identified the root cause: the JS client submits two updates, and because an edit reason is included, the server can’t coalesce them, resulting in two revisions. riking also found a bonus bug: editing title and post together, then editing title again, causes the second title change to attach to the first revision. codinghorror suggested assigning eviltrout, and later praised riking for tackling the long-standing issue. Thomas_G added that title edits alone work fine — the problem lies elsewhere. osioke confirmed riking is still investigating, as the fix requires deeper code changes.

When editing a wiki topic, the edit history notification counts 2 edits. The first edit shows nothing and the second one shows the exact edit and its reasoning.

First issue

The first issue is the one mentioned above


Second issue

When editing a title not from the pencil next to the title, but from the wiki edit, 2 notifications appear again. One notification for the title and one for the reasoning (:information_source:).

Example: I want to change the title but simultaneously let everyone know why I have changed the title. That doesn’t work though, because there are 2 different notifications and not one including everything.


I think that all the edits should appear in one history edit notification and not 2 separate ones. Again, I am not sure if it’s something expected…

2 likes

Can we repro this on Monday @osioke?

4 likes

this happens for all the posts, not only wikis. and as far as I know, it only happens when an edit takes long time to be done. i.e. when you press the edit button, and do edits, and it takes longer than 5-10 min, then you finalize the changes.

3 likes

I couldn’t repro this:

@Thomas_G can you share a screencast/video of your repro?

I could repro this consistently. Editing a wiki post title with a reason for the edit creates 2 edit notification, one for the reasoning and the other for the edit:

Before the title edit:

After the title edit:

3 likes

@osioke - Sure thing:

2 likes

Probably a bug we should assign @eviltrout?

4 likes

Hmm, it looks like the JS client is actually submitting two updates here. The edit reason being included means that the server isn’t allowed to coalesce them, so it creates two revisions instead.

5 likes

Fun bonus bug:

  • Edit a post and the title with a reason. (#6)
  • Edit just the title with a different reason. (#7)

The title change from #7 got attached to revision #6. Revision #7 was created with just the reason and no other changes.

6 likes

This would be a great one to fix @riking as it has been a pernicious thorn in our side :clap:

8 likes

PS: When editing the title, the edit history works fine. The problem is everything else :joy:

3 likes

No worries Thomas, @riking is still on this, the fix requires some deeper digging.

6 likes