Page MenuHomePhabricator

Compound templates prevent section edit links where legacy adds them
Closed, ResolvedPublicBUG REPORT

Description

Check Parsoid vs legacy on vecwiktionary. The "Tradusion" section at the bottom is missing an Edit section link. This is also seen on several other vecwiktionary pages.

@Arlolra says that this is another instance of something he investigated previously in T373400#10135519.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@Arlolra says that this is another instance of something he investigated previously in T373400#10135519.

The task T373400 was about missing styling from the headings not being wrapped and that was fixed. But what remains is that, for compound templates, the $metadata->fromTitle = null; in WrapSectionsState means that we're not going to to be adding section edit links in HandleParsoidSectionLinks

https://github.com/wikimedia/mediawiki-services-parsoid/blob/master/src/Wt2Html/DOM/Processors/WrapSectionsState.php#L100-L102
https://github.com/wikimedia/mediawiki/blob/master/includes/OutputTransform/Stages/HandleParsoidSectionLinks.php#L105-L108

Relatedly, section edit links from nested templated aren't supported in Parsoid (see https://phabricator.wikimedia.org/T368095#9971720) and section titles failing to resolve redirected templates. See all the tests added in T368095 which probably deserve their own tasks.

ABreault-WMF renamed this task from HandleParsoidSectionLinks is skipping edit section links where legacy adds them to Compound templates prevent section edit links where legacy adds them.Apr 10 2025, 7:40 PM

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

[mediawiki/core@master] [WIP] Return HeadingPFragments

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

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

[mediawiki/services/parsoid@master] Add a HeadingPFragment type to be returned by the preprocessor

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

Change #1304193 merged by jenkins-bot:

[mediawiki/core@master] [parser] Return HeadingPFragments while preprocessing

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

Change #1304192 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Add a HeadingPFragment type to be returned by the preprocessor

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

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

[mediawiki/core@wmf/1.47.0-wmf.8] [parser] Return HeadingPFragments while preprocessing

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

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

[mediawiki/core@wmf/1.47.0-wmf.7] [parser] Return HeadingPFragments while preprocessing

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

Change #1305015 merged by jenkins-bot:

[mediawiki/core@wmf/1.47.0-wmf.8] [parser] Return HeadingPFragments while preprocessing

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

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:29:20Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1305015|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305026|[parser] Return ExtTagPFragments while preprocessing (T429624)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:31:31Z] <cscott@deploy1003> cscott: Backport for [[gerrit:1305015|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305026|[parser] Return ExtTagPFragments while preprocessing (T429624)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:41:53Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1305015|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305026|[parser] Return ExtTagPFragments while preprocessing (T429624)]] (duration: 12m 31s)

Change #1305018 merged by jenkins-bot:

[mediawiki/core@wmf/1.47.0-wmf.7] [parser] Return HeadingPFragments while preprocessing

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

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:44:02Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1305017|[parser] Add configuration to return experimental PFragment types]], [[gerrit:rGOJU130501848b37|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305025|[parser] Return ExtTagPFragments while preprocessing (T429624)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:46:11Z] <cscott@deploy1003> cscott: Backport for [[gerrit:1305017|[parser] Add configuration to return experimental PFragment types]], [[gerrit:rGOJU130501848b37|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305025|[parser] Return ExtTagPFragments while preprocessing (T429624)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be v

Mentioned in SAL (#wikimedia-operations) [2026-06-23T13:52:30Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1305017|[parser] Add configuration to return experimental PFragment types]], [[gerrit:rGOJU130501848b37|[parser] Return HeadingPFragments while preprocessing (T391624 T387520 T387521 T384490 T387374)]], [[gerrit:1305025|[parser] Return ExtTagPFragments while preprocessing (T429624)]] (duration: 08m 29s)

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

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

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

Change #1305690 merged by jenkins-bot:

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

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

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

[mediawiki/vendor@wmf/1.47.0-wmf.8] Bump wikimedia/parsoid to 0.24.0-a12

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

Change #1305719 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.8] Bump wikimedia/parsoid to 0.24.0-a12

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

Mentioned in SAL (#wikimedia-operations) [2026-06-25T16:36:37Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1305719|Bump wikimedia/parsoid to 0.24.0-a12 (T353697 T384490 T387374 T387520 T387521 T391624 T393295 T420336 T429624 T429688 T429822)]], [[gerrit:1305720|Bump wikimedia/parsoid to 0.24.0-a12 (T429822)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-25T16:46:32Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1305719|Bump wikimedia/parsoid to 0.24.0-a12 (T353697 T384490 T387374 T387520 T387521 T391624 T393295 T420336 T429624 T429688 T429822)]], [[gerrit:1305720|Bump wikimedia/parsoid to 0.24.0-a12 (T429822)]] (duration: 09m 54s)

Check Parsoid vs legacy on vecwiktionary. The "Tradusion" section at the bottom is missing an Edit section link

Post-deploy and purge, the heading continues to be part of a compound template (many "parts" in the data-mw)

<h3 typeof="mw:Transclusion" about="#mwt13" id="Tradusion" data-mw='{"parts":[{"template":{"target":{"wt":"trad-su","href":"./Modeło:trad-su"},"params":{},"i":0}},"\n:* ",{"template":{"target":{"wt":"t","href":"./Modeło:t"},"params":{"1":{"wt":"en"},"2":{"wt":"brown"}},"i":1}},"\n",{"template":{"target":{"wt":"trad-mexo","href":"./Modeło:trad-mexo"},"params":{},"i":2}},"\n:* ",{"template":{"target":{"wt":"t","href":"./Modeło:t"},"params":{"1":{"wt":"it"},"2":{"wt":"marrone"},"3":{"wt":"m"}},"i":3}},"\n",{"template":{"target":{"wt":"trad-xo","href":"./Modeło:trad-xo"},"params":{},"i":4}}]}'><span typeof="mw:File"><span><img resource="//vec.wiktionary.org/wiki/File:OOjs_UI_icon_language-ltr-progressive.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/OOjs_UI_icon_language-ltr-progressive.svg/40px-OOjs_UI_icon_language-ltr-progressive.svg.png?utm_source=vec.wiktionary.org&amp;utm_campaign=parser&amp;utm_content=thumbnail" decoding="async" data-file-width="20" data-file-height="20" data-file-type="drawing" height="25" width="25" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/OOjs_UI_icon_language-ltr-progressive.svg/60px-OOjs_UI_icon_language-ltr-progressive.svg.png?utm_source=vec.wiktionary.org&amp;utm_campaign=parser&amp;utm_content=thumbnail 2x" class="mw-file-element"/></span></span> Tradusion</h3>

however, now section edit links appear on both

https://vec.wiktionary.org/wiki/maron?useparsoid=0
https://vec.wiktionary.org/wiki/maron?useparsoid=1

pointing to the same https://vec.wiktionary.org/w/index.php?title=Mode%C5%82o:trad-su&action=edit&section=T-1

Section edit link still missing when combined with table syntax.
https://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bean49/test1

Section edit link still missing when combined with table syntax.
https://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bean49/test1

Thanks for providing the test case. This is a bit different than what had been fixed since the headings come from the top level page and are being included in the unbalanced templates region.

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

[mediawiki/services/parsoid@master] Rely on HeadingPFragment to set the index when inTemplate

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

Change #1306014 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Rely on HeadingPFragment to set the index when inTemplate

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

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

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

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

Change #1307003 merged by jenkins-bot:

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

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

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

[mediawiki/vendor@wmf/1.47.0-wmf.9] Bump wikimedia/parsoid to 0.24.0-a14

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

Change #1307059 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.47.0-wmf.9] Bump wikimedia/parsoid to 0.24.0-a14

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

Mentioned in SAL (#wikimedia-operations) [2026-07-02T08:13:59Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1307059|Bump wikimedia/parsoid to 0.24.0-a14 (T387374 T430186 T430367 T430501)]], [[gerrit:1307061|Bump wikimedia/parsoid to 0.24.0-a14 (T430501)]]

Mentioned in SAL (#wikimedia-operations) [2026-07-02T08:16:04Z] <cscott@deploy1003> cscott: Backport for [[gerrit:1307059|Bump wikimedia/parsoid to 0.24.0-a14 (T387374 T430186 T430367 T430501)]], [[gerrit:1307061|Bump wikimedia/parsoid to 0.24.0-a14 (T430501)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-07-02T08:25:44Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1307059|Bump wikimedia/parsoid to 0.24.0-a14 (T387374 T430186 T430367 T430501)]], [[gerrit:1307061|Bump wikimedia/parsoid to 0.24.0-a14 (T430501)]] (duration: 11m 44s)