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
OpenNone
Resolvedihurbain
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
OpenNone
Opencscott
OpenBUG REPORTNone
Openihurbain
Resolvedihurbain
Resolvedihurbain
Openihurbain
Resolvedcscott
Openihurbain
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