{
"key": "root['parse']['parseroutput']['Modules'][*]",
"matched_total": 1470,
"expected_total": 1470,
"by_category": {
"iterable_item_removed": 1469,
"values_changed": 1
},
"examples": [
{
"page": "en.wikipedia.org:Frank M. Snowden Jr.",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:Allen_Ludden",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "zh.wikipedia.org:Talk:\u975e\u6d32\u822a\u7a7a",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:John Dudley (physicist)",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:Alexander Putilov",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][1]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:Wab Kinew",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][1]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:David_K._Jordan",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "zh.wikipedia.org:Talk:\u82cf\u6258\u8212\u5355\u6297",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "en.wikipedia.org:Walter E. H. Cockle",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
},
{
"page": "zh.wikipedia.org:Talk:\u897f\u5948\u822a\u7a7a",
"category": "iterable_item_removed",
"path": "root['parse']['parseroutput']['Modules'][0]",
"value": "ext.pygments.view"
}
]
}Description
| Status | Subtype | Assigned | Task | |
|---|---|---|---|---|
| · · · | ||||
| Open | ihurbain | T433932 Metadata differences between parsoid and legacy | ||
| Open | ihurbain | T433961 Modules ext.pygments.view is not populated in parsoid parseroutput same way legacy did | ||
| · · · |
Event Timeline
For https://en.wikipedia.org/wiki/Wab_Kinew, "View Source" for useparsoid=0 and useparsoid=1 shows that ext.pygments is included in the resource module list for the useparsoid=0 (legacy) case, but not in the Parsoid case. However, it is unclear why that is included because there are no code blocks on that page (looking at the wikitext and inspecting the HTML), and running visualdiff on that page locally shows no diffs either. So, that module doesn't seem to be used really on that page based on this inspection.
So, at least for this page, the question is why did the legacy parser code path include it in the resource module list?
SyntaxHighlight is Parsoid-adapted and includes the resource module when the <syntaxhighlight> tag is used on the page, and if we had diffs from its absence, it would have shown up in visual diffs and users would also have complained.
I can reproduce what you see via view-source on https://en.wikipedia.org/wiki/Wab_Kinew with useparsoid=0.
RLSTATE={"user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready" …
RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view" …
<link rel="stylesheet" href="/w/load.php?lang=en&modules=… ext.pygments …But when you do the same via the Parse API, it doesn't list ext.pygments. This is with usearticle, useskin, and parser=legacy all set.
"modules": [ "site", "mediawiki.page.ready", "skins.vector.js", "mediawiki.page.watch.ajax", "ext.gadget.confirmationRollback-mobile", "ext.gadget.ReferenceTooltips", "ext.gadget.geonotice", "ext.gadget.dropdown-menus", "ext.gadget.switcher" ], "modulescripts": [], "modulestyles": [ "skins.vector.search.codex.styles", "skins.vector.styles", "skins.vector.icons", "ext.gadget.dropdown-menus-pagestyles" ],
Perhaps this helps narrow it down :)
Likely cause is Module:If preview which expands its argument on legacy (before discarding it), while on Parsoid the extension evaluation is deferred and so we end up discarding the argument before evaluating the <syntaxhighlight>.
Module:If preview treats an empty revision ID as preview mode, so this interacts oddly with action=parse.
- The [[Wab Kinew]] article sets alma_mater, which is a deprecated parameter of {{Infobox officeholder}}.
- When that parameter is set, the infobox emits {{preview warning|… deprecated parameter {{code|alma_mater}} … {{code|education}}.}}
- {{code}} is {{#tag:syntaxhighlight|…|inline=1}}.
- {{preview warning}} calls Module:If preview. Its _warning() reads args[1], which expands the argument, and then returns '' unless this is a preview.
Legacy: expanding the argument runs Parser::extensionSubstitution() with ot['html'] set. That calls SyntaxHighlight::parserHook(), which immediately calls addModuleStyles() and addModules() on the ParserOutput (includes/SyntaxHighlight.php:164). This happens during expansion (core/includes/Parser/Parser.php:4031), so it sticks even though the Lua module then discards the text.
Parsoid: templates are expanded in preprocess mode. The same code path doesn't call the hook; it leaves the tag as text (or an exttag strip marker). The tag only reaches handleParsoidTag() if it survives into the final wikitext. Here it's discarded, so the module is never added.
That matches my intuition since we know this happens with ref tags (unused params with ref tags don't show up in references for Parsoid, but do in legacy) and I looked at the Infobox officeholder source briefly but didn't investigate. So, if we can confirm this (which I presume is a claude-generated analysis), I would say this is a non-issue and can be declined.