Page MenuHomePhabricator

TOC missing with Parsoid on some wikis (except for Vector 2022)
Closed, ResolvedPublicBUG REPORT

Description

TOC is missing with Parsoid on huwiki Vector legacy skin.
Example: https://hu.wikipedia.org/wiki/RD%E2%80%93170?uselang=hu&useskin=vector
Switching to legacy parser produces TOC: https://hu.wikipedia.org/wiki/RD%E2%80%93170?uselang=hu&useskin=vector&useparsoid=0
Action purge also brings back the TOC.
No problem on Vector (2022).
Cannot replicate on enwiki.

Event Timeline

A_smart_kitten subscribed.

(I can reproduce the issue using uselang=hu, but not using uselang=en)

Johannnes89 renamed this task from TOC missing with Parsoid on huwiki Vector legacy to TOC missing with Parsoid on some wikis (except for Vector 2022).Sun, Mar 29, 4:52 PM

Looking at, eg, https://als.wikipedia.org/w/index.php?title=Photosynthese&oldid=1074722&useskin=monobook&useparsoid=1 the limit report says:

<!-- 
NewPP limit report
Parsed by mw‐web.eqiad.main‐6dbf997859‐jj4pp
Cached time: 20260402143044
Cache expiry: 2592000
Reduced expiry: false
Complications: [show‐toc, use‐parsoid]
CPU time usage: 0.942 seconds
Real time usage: 1.948 seconds
Preprocessor visited node count: 836/1000000
Revision size: 79883/2097152 bytes
Post‐expand include size: 10979/2097152 bytes
Template argument size: 2186/2097152 bytes
Highest expansion depth: 15/100
Expensive parser function count: 8/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 1152/5000000 bytes
Lua time usage: 0.093/10.000 seconds
Lua memory usage: 4417372/52428800 bytes
Number of Wikibase entities loaded: 1/500
-->
<!-- Saved in RevisionOutputCache with key alswiki:parsoid-rcache:1074722:dateformat=default!useParsoid=1!userlang=en and timestamp 20260402143044 and revision id 1074722.
 -->
<!--
Post‐processing cache key alswiki:postproc‐parsoid‐pcache:44770:|#|:idhash:enableSectionEditLinks=0!injectTOC=0!postproc=1!skin=vector‐2022!useParsoid=1, generated at 20260402143045
-->

Note that the skin in the postproc cache key is vector-2022 despite useskin=monobook in the URL. This suggests that the way we are fetching the skin here isn't working. I'd expect the result would be "vector-2022 style" section edit links, even though we're supposed to be using monobook, in addition to the TOC differences.

This is likely Parsoid-only, simply because we're not enabling the postprocessing cache on legacy parses right now.

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

[mediawiki/core@master] Ensure RevisionOutputCache uses post-processing options where appropriate

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

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

[mediawiki/core@master] Factor out ParserOutputAccess::preprocessInPipeline() for use by FlaggedRevs

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

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

[mediawiki/extensions/FlaggedRevs@master] Re-use ParserOutputAccess::postprocessInPipeline() when postprocessing

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

Two separate bugs: first, the code in ParserOutputAccess which dumps the parser cache key shows the key as it would be used in the primary (latest revision) cache, but in this case output was coming from the secondary (old revision) cache so the dumped key was misleading.  The old revision cache was actually omitting all the postprocessing options from the key, which caused it to fetch output for the "wrong" skin from the cache.  Fixed in Ensure RevisionOutputCache uses post-processing options where appropriate (1267124).

The second bug was that FlaggedRevs was not marking the postprocessing options as 'used', which caused 'skin' to be omitted from the cache key.  Fixed by refactoring to reuse the (correct) code from ParserOutputAccess, in Factor out ParserOutputAccess::preprocessInPipeline() for use by FlaggedRevs (1267125) in core and Re-use ParserOutputAccess::postprocessInPipeline() when postprocessing (1267126) in flagged revs.

Jdlrobson-WMF moved this task from Needs triage to Triaged on the Vector (legacy skin) board.

Change #1267124 merged by jenkins-bot:

[mediawiki/core@master] Ensure RevisionOutputCache uses post-processing options where appropriate

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

Change #1267125 merged by jenkins-bot:

[mediawiki/core@master] Factor out ParserOutputAccess::preprocessInPipeline() for use by FlaggedRevs

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

Change #1267126 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Re-use ParserOutputAccess::postprocessInPipeline() when postprocessing

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

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

[mediawiki/core@wmf/1.46.0-wmf.22] Ensure RevisionOutputCache uses post-processing options where appropriate

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

Change #1268600 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.22] Ensure RevisionOutputCache uses post-processing options where appropriate

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

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:09:01Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1268600|Ensure RevisionOutputCache uses post-processing options where appropriate (T421629)]], [[gerrit:1268625|Remove Navigation Menu Link Instrumentation on Personal Dashboard (T422512)]], [[gerrit:1268633|ForeignWikiRequest: Pass session to internal 'centralauthtoken' request (T422218)]], [[gerrit:1268651|PHP SDK: Handle experiment config missing or

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:10:51Z] <cscott@deploy1003> cscott, kgraessle, sfaci, matmarex: Backport for [[gerrit:1268600|Ensure RevisionOutputCache uses post-processing options where appropriate (T421629)]], [[gerrit:1268625|Remove Navigation Menu Link Instrumentation on Personal Dashboard (T422512)]], [[gerrit:1268633|ForeignWikiRequest: Pass session to internal 'centralauthtoken' request (T422218)]], [[gerrit:1268651|PHP SDK: Handle experiment config

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:17:54Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1268600|Ensure RevisionOutputCache uses post-processing options where appropriate (T421629)]], [[gerrit:1268625|Remove Navigation Menu Link Instrumentation on Personal Dashboard (T422512)]], [[gerrit:1268633|ForeignWikiRequest: Pass session to internal 'centralauthtoken' request (T422218)]], [[gerrit:1268651|PHP SDK: Handle experiment config missing or

Should be fixed when wmf.23 rolls out tomorrow (Apr 9).

Tested & verified fixed. You might have to purge the cache in some cases, but most pages shouldn't need this.