Page MenuHomePhabricator

Comments not being detected in specific section at ko.wiki
Closed, ResolvedPublic

Description

Behavior

  1. Visit https://w.wiki/Yfi (this link should have ?dtenable=1 appended to it)
  2. Find the section titled 글 숨김
  3. Click any of the [ 답변 ] in this section

Actual

  1. ❗️Notice the following message is shown: The "답변" link cannot be used to reply to this comment. To reply, please use the full page editor by clicking "원본 편집".

Expected

  1. ✅The Reply Tool is presented

Done

  • 1. The "Expected" behavior is implemented or
  • 2. If "1." is not possible, the cause of the "Actual" behavior is identified

Event Timeline

This happens because DiscussionTools can determine that the comments in that section are transcluded from a different page, but it can't determine from which page, so we don't know where the replies should be posted. The first sections on that page are transcluded in a unique way that causes this.

How this page works

If you open the page in edit mode (https://ko.wikipedia.org/w/index.php?title=위키백과:사랑방_(기술)&action=edit), clearly the contents are not there, there is only some code and warnings not to comment there directly:

image.png (2×3 px, 530 KB)

This code at the top transcludes the comments from three different pages:

{{#ifexpr: {{#timel: j}} < 16 | {{위키백과:사랑방 (기술)/{{Y-M|-2}}}} | }}
{{위키백과:사랑방 (기술)/{{Y-M|-1}}}}
{{위키백과:사랑방 (기술)/{{Y-M|0}}}}

What this does is automatically transclude subpages for the current and previous month (line 3 and 2), and also conditionally transclude the subpage for the second-previous month if current day is less than 16 (line 1).

Why is this a problem

DiscussionTools can deal with the transclusions on line 2 and 3, e.g. line 2 ends up transcluding from this page: https://ko.wikipedia.org/wiki/위키백과:사랑방_(기술)/2020년_7월 and when you try to reply to one of these comments on the "main" page, the interface actually has a note about this:

image.png (2×3 px, 723 KB)

DiscussionTools can't deal with the transclusion on line 1 because the subpage transclusion is "nested" inside the #ifexpr: parser function, and we only have information about top-level transclusions in the Parsoid document.

How to fix it

I don't think we can fix it in the software, but it would be possible to change the transclusion code so that DiscussionTools can detect it. The following should work (instead of line 1):

{{ {{#ifexpr: {{#timel: j}} < 16 | 위키백과:사랑방 (기술)/{{Y-M|-2}} | Void }} }}

In this version, the transclusion is unconditional at the top level, and the conditional expression only controls which page is transcluded: either the subpage, or https://ko.wikipedia.org/wiki/틀:Void, which is a special template that outputs nothing. DiscussionTools will be able to handle this like the other two transclusions, which are similarly dynamic.

(I could make the changes on the page myself, but I'd prefer if somebody from the Korean Wikipedia could confirm that they make sense, and also help us find other pages that might have a similar problem.)

By the way, would it be possible to log something on the browser console that explains the issue, at least in debug mode (&debug=1)? It would help wikis to fix their talk pages without filing a Phabricator task or using the browser’s JavaScript debugger (which is time-consuming, and also needs much more web development experience than just checking the console).

@Tacsipacsi I'd be open to that, but in this particular case, I don't think there is anything useful we could log. What kind of a message would you expect?

You inspired me to instead try writing a documentation page for understanding DiscussionTools issues/limitations as a user… https://www.mediawiki.org/wiki/Help:DiscussionTools/Why_can't_I_reply_to_this_comment? – it's a bit off-topic here, but feel free to comment on the talk page there (or edit it). I'd very much love it if users could resolve these problems themselves, but so far a majority of the issues I've seen reported were completely new and I had to learn what causes them myself ;)

This should be fixed by on-wiki changes now – however, when trying to confirm that, I ran into another (unrelated?) problem with the same page: T260180 (edit: duplicate of T236866).

This should be fixed by on-wiki changes now – however, when trying to confirm that, I ran into another (unrelated?) problem with the same page: T260180.

@matmarex, can you think of a good way to test whether the issue this task is about is actually resolved?

I asked the above considering I, and assume others, are not able to respond to the comments in question [i].


  1. Visit https://w.wiki/Yfi (this link should have ?dtenable=1 appended to it)
  2. Find the section titled 글 숨김
  3. Click any of the [ 답변 ] in this section
  4. ❗️Notice the following dialog is shown:

Screen Shot 2020-08-12 at 10.40.28 AM.png (1×2 px, 766 KB)

I think ideally we'd get T260180/T236866 fixed… I commented on that task.

(should be verifiable now, with that bug fixed)

This seems to be working as expected now:

Screen Shot 2020-08-28 at 5.28.04 PM.png (752×2 px, 173 KB)

ppelberg claimed this task.