Page MenuHomePhabricator

[Regression] Reply links are not working on a specific page on Dutch wiki
Closed, ResolvedPublic

Description

It seems that the reply links are not working on this page: https://nl.wikipedia.org/wiki/Overleg_gebruiker:RYasmeen_(WMF)

There is an error in the console while loading the page:
TypeError: Cannot set property 'parent' of undefined

I have looked into the following document but it seems none of the cases mentioned there matches with the page mentioned above, but I could be wrong. All of the them at-least shows a prompt mentioning the reason why it's not possible to reply, but in my case it just does not do anything after clicking on the "Reply" links.

https://www.mediawiki.org/wiki/Help:DiscussionTools/Why_can%27t_I_reply_to_this_comment%3F

Event Timeline

matmarex subscribed.

Near the end of the page, the [reply] link for several comments appears in the wrong place, after the next comment. This indicates that the range of that comment is detected incorrectly, as if the next comment was inside those comments. This breaks various assumptions in the code and causes this exception.

These are the wrongly placed reply links, and the arrows point to where they should be:

image.png (941×2 px, 359 KB)

It seems that the code added in rEDTOd0ae6c4e445e: Skip end marker "forward" until a block tag is reached skips over entire <font>…</font> tags, ignoring the fact that they can contain block tags. This might be a more general problem with "transparent" tags.

Change 655122 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Broken test cases for a big mess of <font> tags

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

Change 655123 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] [WIP] Fix skipping to the end of paragraph, now it considers nested tags

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

Change 655122 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Broken test cases for a big mess of <font> tags

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

Change 655123 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Fix skipping to the end of paragraph, now it considers nested tags

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