Page MenuHomePhabricator

Reply added in the wrong place (above existing replies) for comments with the unsigned template on ko.wp
Closed, ResolvedPublic

Description

reported in https://ko.wikipedia.org/wiki/위키백과:사랑방_(기술)/2020년_7월#Reply_tool_as_a_Beta_Feature

In this edit: https://ko.wikipedia.org/w/index.php?diff=27365139&diffmode=source the new reply was added above existing replies to the comment with the unsigned template, but it should have been added below.

Event Timeline

The issue can still be seen when using the reply buttons on the old revision, even without saving: https://ko.wikipedia.org/w/index.php?title=위키백과:질문방/2020년_8월&oldid=27365127#번역_충돌_해소_방법?

Replying to the first reply to that comment would also insert the reply in the wrong place.

Reply buttonActual reply widget positionExpected reply widget position
top-level comment with "unsigned" template
image.png (2×3 px, 786 KB)
image.png (2×3 px, 664 KB)
image.png (2×3 px, 784 KB)
first reply
image.png (2×3 px, 778 KB)
image.png (2×3 px, 672 KB)
image.png (2×3 px, 781 KB)

The bug is triggered by the text after the signature. DiscussionTools incorrectly treats it it as if it was a part of the second comment rather than the first, like this:

Comment 1Comment 2
image.png (2×3 px, 778 KB)
image.png (2×3 px, 778 KB)

…and because of this, it incorrectly detects the indentation level of comment 2, and puts the replies to both comments in the wrong places.

I actually already have a patch that will fix this! (it was written to fix a different bug, but will fix this too)

Change 619551 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Skip to the end of the paragraph in the parser, not modifier

https://gerrit.wikimedia.org/r/619551

Change 619551 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Skip to the end of the paragraph in the parser, not modifier

https://gerrit.wikimedia.org/r/619551

I'm going to re-check this the week of 7-September, by which point, I'm assuming, https://gerrit.wikimedia.org/r/619551 will have landed at ko.wiki.

EDIT: this can be tested now at the Korean Wikipedia's beta wiki: https://ko.wikipedia.beta.wmflabs.org/wiki/%EB%8C%80%EB%AC%B8


i. T260855#6398276