Page MenuHomePhabricator

DiscussionTools duplicates the meta-data sub-header content when Previewing
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The meta-data is duplicated. (Confirmed on Enwiki and Frwiki, with a default-setting account)

image.png (584×1 px, 140 KB)

image.png (752×1 px, 229 KB)

Event Timeline

DLynch added subscribers: ihurbain, DLynch.

Happens in the 2017 editor's preview as well, which takes a different path.

It's caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/1225002

I looked into this, and it's the same cause as 1251133 though, except ::useParsoid() doesn't seem to be set when VE is doing the preview parse (for some reason). We could use another indication of a being a "parsoid parse" to avoid the issue, or fix VE to set ::useParsoid() when doing its preview parse.

I don't have a patch yet, but will figure one out on Monday if @ihurbain doesn't beat me to it.

Alternatively/additionally, the bug goes away if you set $wgUsePostprocCacheLegacy = true, which it should be in production shortly, since DT won't use the postprocessing cache otherwise.

Change #1253446 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/extensions/DiscussionTools@master] Fix double post-processing in legacy preview case

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

Change #1253551 had a related patch set uploaded (by C. Scott Ananian; author: Isabelle Hurbain-Palatin):

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.19] Fix double post-processing in legacy preview case

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

Change #1253446 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Fix double post-processing in legacy preview case

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

Change #1253560 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/VisualEditor@master] Ensure preview parser matches the user's current read views parser

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

Change #1253551 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.19] Fix double post-processing in legacy preview case

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

Mentioned in SAL (#wikimedia-operations) [2026-03-16T20:25:59Z] <cscott@deploy2002> Started scap sync-world: Backport for [[gerrit:1253551|Fix double post-processing in legacy preview case (T419908)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-16T20:27:46Z] <cscott@deploy2002> cscott: Backport for [[gerrit:1253551|Fix double post-processing in legacy preview case (T419908)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-03-16T20:32:52Z] <cscott@deploy2002> Finished scap sync-world: Backport for [[gerrit:1253551|Fix double post-processing in legacy preview case (T419908)]] (duration: 06m 52s)

Change #1253560 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Ensure preview parser matches the user's current read views parser

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