Page MenuHomePhabricator

Find a way to replace the use of ParserOutput::addJsConfigVars() in DiscussionTools
Open, HighPublic

Description

Follow-up to T372499.

https://gerrit.wikimedia.org/g/mediawiki/extensions/DiscussionTools/+/3ec0789d06c2473e5a4c5a951a402166720ca49a/includes/CommentFormatter.php#417

		// Temporary hack to deal with T351461#9358034: this should be a
		// call to `setJsConfigVar` but Parsoid is currently reprocessing
		// content from extensions. (T372592)
		// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
		@$pout->addJsConfigVars( 'wgDiscussionToolsPageThreads', $threadsJSON );

(see T351461#9358034 and T372592)

addJsConfigVars() is hard-deprecated since https://gerrit.wikimedia.org/r/c/mediawiki/core/+/943642 (August 2024). A solution is needed somewhat urgently.

Related Objects

StatusSubtypeAssignedTask
OpenNone
Openihurbain
ResolvedPRODUCTION ERRORmatmarex
Resolvedihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
OpenNone
Resolvedcscott
ResolvedBUG REPORTcscott
Resolvedcscott
Resolvedcscott
OpenNone
ResolvedKrinkle
ResolvedKrinkle
Resolved DAlangi_WMF
Opencscott
Openihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
OpenNone
ResolvedPRODUCTION ERRORcscott
Openihurbain

Event Timeline

Change #1074544 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/DiscussionTools@master] Always set a value for isEmptyTalkPage when transforming html

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

Change #1074544 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Always set a value for isEmptyTalkPage when transforming html

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

I forgot about this issue, and only caught it in (non-gated) tests for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1196123.

Is the re-processing done yet? Can we remove this final usage?

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

[mediawiki/core@master] Add prefixed title to ParserOutput (like it is done in Parsoid)

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

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

[mediawiki/extensions/DiscussionTools@master] [DNM] Moves legacy processing to ParserOutputPostCacheTransform

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

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

[mediawiki/core@master] Add a hook to allow DT to opt-in legacy parser postprocessing cache

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

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

[mediawiki/core@master] Adds "IS_INTERFACE" as a flag of the ParserOutput

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

Change #1226310 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/core@master] Add a hook to allow DT to opt-in legacy parser postprocessing cache

Reason:

not needed

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

Change #1224904 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/core@master] Add title and "isMessage" outputflags to ParserOutput

Reason:

in favor of title added by cscott and ismessage being added to options instead

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

Change #1233195 merged by jenkins-bot:

[mediawiki/core@master] Make the ParserOptions accessible to onParserOutputPostCacheTransform

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

Change #1225002 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Enables legacy processing in ParserOutputPostCacheTransform when cached

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

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

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.19] Enables legacy processing in ParserOutputPostCacheTransform when cached

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

Change #1250007 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.19] Enables legacy processing in ParserOutputPostCacheTransform when cached

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

Mentioned in SAL (#wikimedia-operations) [2026-03-10T20:25:45Z] <jforrester@deploy2002> Started scap sync-world: Backport for [[gerrit:1240012|Enable personal main menu to all users in Minerva Neue skin (T413912)]], [[gerrit:1250007|Enables legacy processing in ParserOutputPostCacheTransform when cached (T372592)]], [[gerrit:1250015|Parser: Raise minimum TTL from 30 min to 'next midnight' in miser mode (T416616 T416540 T419439)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-10T20:27:51Z] <jforrester@deploy2002> jforrester, cscott, bwang: Backport for [[gerrit:1240012|Enable personal main menu to all users in Minerva Neue skin (T413912)]], [[gerrit:1250007|Enables legacy processing in ParserOutputPostCacheTransform when cached (T372592)]], [[gerrit:1250015|Parser: Raise minimum TTL from 30 min to 'next midnight' in miser mode (T416616 T416540 T419439)]] synced to the testservers (see https://wikitech.wi

Mentioned in SAL (#wikimedia-operations) [2026-03-10T20:38:43Z] <jforrester@deploy2002> Finished scap sync-world: Backport for [[gerrit:1240012|Enable personal main menu to all users in Minerva Neue skin (T413912)]], [[gerrit:1250007|Enables legacy processing in ParserOutputPostCacheTransform when cached (T372592)]], [[gerrit:1250015|Parser: Raise minimum TTL from 30 min to 'next midnight' in miser mode (T416616 T416540 T419439)]] (duration: 12m 58s)