Re: SVWP title DOM differ from displaytitle
Subramanya Sastry via MediaWiki-l <[email protected]> Tue, 31 Mar 2026 06:52:32 +0530
| Newsgroups | gmane.org.wikimedia.mediawiki |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============0563008824112693139==
Content-Type: multipart/alternative;
boundary="------------y0plFTbO3ULBMWyaMG46aOto"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------y0plFTbO3ULBMWyaMG46aOto
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Some additional useful information to add to the technical details Scott
shared in his email. The reason you are noticing these changes now is
because we rolled out Parsoid-based-read-view rendering to svwiki
recently [1]. But, enwiki is still not using Parsoid (but will also
start using Parsoid in the coming months), so the difference you are
seeing between svwiki and enwiki is because of this.
In his email, Scott pointed to the phab task / gerrit patch [2] that
introduced the extra span in the DOM structure. Separately, he also
pointed to a change [3] that might roll out soon that might make Parsoid
and the old parser emit the span wrapper identically. But, as he notes,
the API and the read view code paths could be reconciled so that the
outputs could match better. Till we make that fix, you will notice the
difference between the API and the DOM structure.
Hopefully this helps clarify why you are noticing this now.
Subbu.
1.
https://sv.wikipedia.org/wiki/Wikipedia:Bybrunnen/Massmeddelanden#Migration_to_Parsoid
2. https://phabricator.wikimedia.org/T36514#11350666
3. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1264213
On 3/30/26 18:56, Viktoria Hillerud via MediaWiki-l wrote:
>
> Hi!
>
> We are working on the Wikispeech extension and have run into an issue
> on Swedish Wikipedia (svwp) where the page title DOM seems different
> both from the *displayTitle*returned by the API and from what we see
> on other wikis.
>
> For example, if we query:
>
> *https://sv.wikipedia.org/w/api.php?action=parse&format=json&page=Apa&prop=displaytitle&formatversion=2
> <https://sv.wikipedia.org/w/api.php?action=parse&format=json&page=Apa&prop=displaytitle&formatversion=2>*
>
> we get:
>
> *{"title":"Apa","pageid":3877894,"displaytitle":"<span
> class=\"mw-page-title-main\">Apa</span>"}}*
>
> However, in the actual DOM on svwp, the title appears wrapped
> differently, for example:
>
> *<span lang="sv" dir="ltr"><span
> class="mw-page-title-main">Apa</span></span> + editsection span*
> *
> *
> So it adds an extra *<span>*..
>
> What confuses us is that this seems to behave differently from other
> wikis we have tested, such as enwp, where the title DOM appears as the
> *displayTitle*structure.
>
> Is there something specific about svwp that causes the page title DOM
> to be wrapped differently from other wikis, or has there been any
> updates regarding the structure?
>
> Kind regards,
> *Viktoria Hillerud Ahlbäck*
> /Developer/
> Wikimedia Sverige (WMSE)
>
>
> _______________________________________________
> MediaWiki-l mailing list [email protected]
> To unsubscribe send an email [email protected]
> https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
--------------y0plFTbO3ULBMWyaMG46aOto
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Some additional useful information to add to
the technical details Scott shared in his email. The reason you
are noticing these changes now is because we rolled out
Parsoid-based-read-view rendering to svwiki recently [1]. But,
enwiki is still not using Parsoid (but will also start using
Parsoid in the coming months), so the difference you are seeing
between svwiki and enwiki is because of this.</font>
<p><font face="monospace">In his email, Scott pointed to the phab
task / gerrit patch [2] that introduced the extra span in the
DOM structure. Separately, he also pointed to a change [3] that
might roll out soon that might make Parsoid and the old parser
emit the span wrapper identically. But, as he notes, the API
and the read view code paths could be reconciled so that the
outputs could match better. Till we make that fix, you will
notice the difference between the API and the DOM structure.</font></p>
<font face="monospace">Hopefully this helps clarify why you are
noticing this now.</font>
<p><font face="monospace">Subbu.</font></p>
<font face="monospace">1.
<a class="moz-txt-link-freetext" href="https://sv.wikipedia.org/wiki/Wikipedia:Bybrunnen/Massmeddelanden#Migration_to_Parsoid">https://sv.wikipedia.org/wiki/Wikipedia:Bybrunnen/Massmeddelanden#Migration_to_Parsoid</a></font><br>
<font face="monospace">2.
<a class="moz-txt-link-freetext" href="https://phabricator.wikimedia.org/T36514#11350666">https://phabricator.wikimedia.org/T36514#11350666</a></font><br>
<font face="monospace">3.
<a class="moz-txt-link-freetext" href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1264213">https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1264213</a> </font>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 3/30/26 18:56, Viktoria Hillerud via
MediaWiki-l wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL=ZoLK8oOLLZ+RVr5C1AEJA4Efi5vzfwAkGWkvTqRhJsnk0Qw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>
<p dir="ltr"
style="line-height:1.38;margin-top:0pt;margin-bottom:12pt"
id="gmail-docs-internal-guid-49c9381e-7fff-ab2c-ed9d-7212f543301b"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Hi!</span></p>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We are working on the Wikispeech extension and have run into an issue on Swedish Wikipedia (svwp) where the page title DOM seems different both from the </span><b><span
style="color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;font-family:monospace"><font
size="1">displayTitle</font></span></b><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> returned by the API and from what we see on other wikis.</span></p>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">For example, if we query:</span></p>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><b><span
style="color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;font-family:monospace"><font
size="1"><a
href="https://sv.wikipedia.org/w/api.php?action=parse&format=json&page=Apa&prop=displaytitle&formatversion=2"
moz-do-not-send="true">https://sv.wikipedia.org/w/api.php?action=parse&format=json&page=Apa&prop=displaytitle&formatversion=2</a></font></span></b></p>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">we get:</span></p>
<span style="font-family:monospace"><font size="1"><b><span>{"title":</span><span
class="gmail-ͼz">"Apa"</span><span>,"pageid":</span><span
class="gmail-ͼy">3877894</span><span>,"displaytitle":</span><span
class="gmail-ͼz">"<span
class=\"mw-page-title-main\">Apa</span>"</span><span>}}</span></b></font></span>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">However, in the actual DOM on svwp, the title appears wrapped differently, for example:</span></p>
<span style="font-family:monospace"><b><font size="1"><span
lang="sv" dir="ltr"><span
class="mw-page-title-main">Apa</span></span>
+ editsection span</font></b></span><br>
<font size="1" style="font-family:monospace"><b><br>
</b></font></div>
<div><font size="2" face="arial,sans-serif">So it adds an extra
</font><font style="font-family:monospace" size="1"><b><span></b>..</font>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">What confuses us is that this seems to behave differently from other wikis we have tested, such as enwp, where the title DOM appears as the </span><b><span
style="color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;font-family:monospace"><font
size="1">displayTitle</font></span></b><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> structure.</span></p>
<p dir="ltr"
style="line-height:1.38;margin-top:12pt;margin-bottom:12pt"><span
style="font-size:11pt;font-family:Arial,sans-serif;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Is there something specific about svwp that causes the page title DOM to be wrapped differently from other wikis, or has there been any updates regarding the structure?</span></p>
Kind regards,</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div><b>Viktoria Hillerud Ahlbäck</b></div>
<div><i>Developer</i></div>
<div><span>Wikimedia Sverige (WMSE) <br>
<br>
</span></div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
MediaWiki-l mailing list -- <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
To unsubscribe send an email to <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/">https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/</a></pre>
</blockquote>
</body>
</html>
--------------y0plFTbO3ULBMWyaMG46aOto--
--===============0563008824112693139==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
MediaWiki-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
--===============0563008824112693139==--