Page MenuHomePhabricator

Reply tool does not work on talk pages with a background/frame created using a template
Open, Needs TriagePublic

Description

Reply tool does not work on talk pages with a background/frame created by using a template that outputs an unclosed opening tag, and relying on it to be closed automatically at the end of the content. Such a thing marks the entire content of the page as a transclusion, making it impossible to reply using the tool, as documented here: Help:DiscussionTools/Why can't I reply to this comment?#Accidental complex transclusion. This is a long-known problem, but there wasn't a task for it, so here it is.

The issue was most recently raised here: https://www.mediawiki.org/wiki/Topic:Wa9y0dlw4n9jl8ns

As a workaround, you can use the same unclosed opening tag directly on the page rather than in a template, which doesn't cause the problem. (But may sometimes cause dirty diffs, in which the closing tag is added.)

See also T271588, which proposes a change to TemplateStyles that would offer a better workaround (a way to create backgrounds/frames without unclosed tags).

To resolve the problem in DiscussionTools, we would need Parsoid to support editing content in transclusions as DOM (basically the same thing that would be required to have visual editing of template parameters in VisualEditor). This work is tracked in T71870, but it's unlikely to happen soon.

Event Timeline

This isn't really about templates is it? Isn't this problem more of "Reply tool does not work on pages with unclosed elements / malformed markup" ?

No, it is specifically about templates. Unclosed elements are mostly fine (some malformed markup may result in dirty diffs though).

So if whatever template causes this is subst'd the problem goes away?

Yeah.

(But I got the impression that people don't want to do that, since it inserts more markup into the talk page that you have to ignore when leaving comments with the wikitext editor, and any changes to it now require edits to the talk page that show up on watchlists, rather than edits to some template/subpage.)