Page MenuHomePhabricator

Transclusion data-mw attributes get munged together
Closed, ResolvedPublic

Description

Symptoms

In Android app

There's is no spoken Wikipedia entry for [[en:Cat]] anymore.

In MCS

Problem

Parsoid now moves certain data-mw to another DOM element.

Expected

http://0.0.0.0:8000/en.wikipedia.org/v3/page/html/Cat/803943899 to include a div#section_SpokenWikipedia with a data-mw attribute containing template information.

<div id="section_SpokenWikipedia" class="infobox sisterproject noprint" about="#mwt1136" typeof="mw:Transclusion" data-parsoid='{"stx":"html","dsr":[153013,153106,null,null],"pi":[[{"k":"1"},{"k":"2"},{"k":"3"},{"k":"4"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"Spoken Wikipedia-3","href":"./Template:Spoken_Wikipedia-3"},"params":{"1":{"wt":"2007-05-13"},"2":{"wt":"En-Cat_(part_1).ogg"},"3":{"wt":"En-Cat_(part_2).ogg"},"4":{"wt":"En-Cat_(part_3).ogg"}},"i":0}}]}'>
Actual

https://en.wikipedia.org/api/rest_v1/page/html/Cat/803943899 to include a div#section_SpokenWikipedia is missing attributes about, typeof, and data-mw.

<div id="section_SpokenWikipedia" class="infobox sisterproject noprint">

I found some of the template data in another location of the file (towards the beginning).

<span class="plainlinks selfreference noprint" about="#mwt4" typeof="mw:Transclusion" data-mw='{
[...]
,"\n\n==External links==\n",{"template":{"target":{"wt":"Spoken Wikipedia-3","href":"./Template:Spoken_Wikipedia-3"},"params":{"1":{"wt":"2007-05-13"},"2":{"wt":"En-Cat_(part_1).ogg"},"3":{"wt":"En-Cat_(part_2).ogg"},"4":{"wt":"En-Cat_(part_3).ogg"}},"i":69}},"\n* ",

Introduced

The Parsoid revision I think this is introduced is
[7ec1f8369ef2e620858b40eadb7c43f1c4fa6d3d] P-wrapper: Generalize removal of useless p-wrappers

More details:
[...]
$ git bisect good
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[7ec1f8369ef2e620858b40eadb7c43f1c4fa6d3d] P-wrapper: Generalize removal of useless p-wrappers
$ git bisect bad
Bisecting: 1 revision left to test after this (roughly 1 step)
[ba3146bf3bd30445131789b0320ff1e8cdaf8f55] Minor: Rename BlockTags to HTML4BlockTags
$ git bisect good
Bisecting: 0 revisions left to test after this (roughly 0 steps)

Event Timeline

bearND created this task.Oct 6 2017, 2:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bearND added a comment.Oct 6 2017, 2:48 PM

Hmm, this doesn't seem to affect the [[en:Bill_Clinton]] article.

Arlolra assigned this task to ssastry.Oct 6 2017, 3:03 PM
Arlolra added a subscriber: Arlolra.

"[7ec1f8369ef2e620858b40eadb7c43f1c4fa6d3d] P-wrapper: Generalize removal of useless p-wrappers" is the culprit.

bearND updated the task description. (Show Details)Oct 6 2017, 3:10 PM

Change 382729 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Useless p-wrapper stripping shouldn't get tripped by tpl meta tags

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

Change 382729 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Useless p-wrapper stripping shouldn't get tripped by tpl meta tags

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

Change 382628 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/mobileapps@master] Hygiene: update diff test results disable spokenWP test

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

Change 382628 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Hygiene: update diff test results disable spokenWP test

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

Elitre added a subscriber: Elitre.Oct 12 2017, 7:41 AM
Arlolra closed this task as Resolved.Oct 17 2017, 3:43 PM