Page MenuHomePhabricator

Template content encapsulation is incorrect for a large template
Closed, ResolvedPublic

Description

This article: https://ru.wikipedia.org/wiki/Отто,_Пауль is fully generated by one huge template transclusion. (I got it from the discussion at https://meta.wikimedia.org/wiki/Requests_for_comment/The_future_of_Abstract_Wikipedia#Wikidata-based_alternative_without_lexemes)

However, in VE only the infobox and first paragraph are marked as template-generated:

image.png (1,903×1,008 px, 285 KB)

The rest of the article can be edited visually, which should not be possible, because those changes are lost when saving.

Event Timeline

ssastry subscribed.

I think this may be an instance of T385317: Section wrapping can break encapsulation continuity so that subsequent passes are confused where a TOC meta tag is inserted by some pass without paying attention template continuity.

See this HTML snippet that is the source of the template encapsulation breakage where the meta tag interferes because it doesn't have the about="#mwt1" attribute.

<span about="#mwt1">

</span><meta property="mw:PageProp/toc" data-parsoid="{}" data-mw='{"autoGenerated":true}'/><h2 about="#mwt1" id="Биография" data-parsoid="{}"><span id=".D0.91.D0.B8.D0.BE.D0.B3.D1.80.D0.B0.D1.84.D0.B8.D1.8F" typeof="mw:FallbackId" data-parsoid="{}"></span>Биография</h2>

Change #1311896 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] Ensure continuity of template wrapping layer after TOC insertion

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

That patch fixes the issue - just need to add a suitable unit test.

Change #1311896 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Ensure continuity of template wrapping layer after TOC insertion

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

Change #1318304 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

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

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

Change #1318304 merged by jenkins-bot:

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

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

Change #1318746 had a related patch set uploaded (by Arlolra; author: Subramanya Sastry):

[mediawiki/vendor@wmf/1.47.0-wmf.13] Bump wikimedia/parsoid to 0.24.0-a17

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

Change #1318746 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.13] Bump wikimedia/parsoid to 0.24.0-a17

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

Mentioned in SAL (#wikimedia-operations) [2026-07-28T20:50:11Z] <arlolra@deploy1003> Started scap sync-world: Backport for [[gerrit:1318746|Bump wikimedia/parsoid to 0.24.0-a17 (T19006 T234299 T360814 T385317 T432477 T433018)]], [[gerrit:1318747|Bump wikimedia/parsoid to 0.24.0-a17 (T433018)]]

Mentioned in SAL (#wikimedia-operations) [2026-07-28T20:58:30Z] <arlolra@deploy1003> Finished scap sync-world: Backport for [[gerrit:1318746|Bump wikimedia/parsoid to 0.24.0-a17 (T19006 T234299 T360814 T385317 T432477 T433018)]], [[gerrit:1318747|Bump wikimedia/parsoid to 0.24.0-a17 (T433018)]] (duration: 08m 19s)