Page MenuHomePhabricator

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

Assigned To
Authored By
matmarex
Aug 19 2020, 8:24 PM
Referenced Files
F32189077: image.png
Aug 19 2020, 8:46 PM
F32189079: image.png
Aug 19 2020, 8:46 PM
F32189065: image.png
Aug 19 2020, 8:36 PM
F32189052: image.png
Aug 19 2020, 8:36 PM
F32189063: image.png
Aug 19 2020, 8:36 PM
F32189056: image.png
Aug 19 2020, 8:36 PM
F32189070: image.png
Aug 19 2020, 8:36 PM
F32189061: image.png
Aug 19 2020, 8:36 PM

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