Page MenuHomePhabricator

mw:Param meta tags can sometimes leak through unprocessed
Closed, ResolvedPublic

Description

Investigating T426649: PHP Warning: Undefined property: Wikimedia\Parsoid\NodeData\DataMw::$parts led me to https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/1290919 and in the process of debugging, I noticed that we had mw:Param metas in the DOM Range Builder after template wrapping. That was surprising because they weren't supposed to get through that far. But, I deferred going down that rabbit hole and opted to fix the warnings in a different way which also made the code a bit more clearer on its own. But, the regression test added there exposes this meta leakage. We should investigate how they escape processing and clean it up ideally.

Event Timeline

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

[mediawiki/services/parsoid@master] Set inTemplate pipeline opt when reprocessing tokens

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

Change #1293154 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Set inTemplate pipeline opt when reprocessing tokens

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

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

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a6

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

Change #1295051 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.24.0-a6

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

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

[mediawiki/vendor@wmf/1.47.0-wmf.4] Bump wikimedia/parsoid to 0.24.0-a6

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

Change #1295066 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.4] Bump wikimedia/parsoid to 0.24.0-a6

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

Mentioned in SAL (#wikimedia-operations) [2026-05-28T20:43:02Z] <arlolra@deploy1003> arlolra: Backport for [[gerrit:1295066|Bump wikimedia/parsoid to 0.24.0-a6 (T420336 T427098 T427354 T427082)]], [[gerrit:1295067|Bump wikimedia/parsoid to 0.24.0-a6 (T427082)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-28T20:48:48Z] <arlolra@deploy1003> Finished scap sync-world: Backport for [[gerrit:1295066|Bump wikimedia/parsoid to 0.24.0-a6 (T420336 T427098 T427354 T427082)]], [[gerrit:1295067|Bump wikimedia/parsoid to 0.24.0-a6 (T427082)]] (duration: 07m 34s)

Pre-deploy, I took page from T426649 and looked at the html output and metas were clearly visible,

https://vi.wikipedia.org/wiki/Th%C3%A0nh_vi%C3%AAn:Nakon/cascade2

<meta typeof="mw:Param"/><meta typeof="mw:Param/End"/>

Post-deploy and purge, they are no longer there.