Page MenuHomePhabricator

Mobile-Sections query only returns references section
Closed, ResolvedPublic

Description

Original Issue: https://github.com/openzim/mwoffliner/issues/404

This query is only returning the references section and is missing the actual content of the page:
https://pt.wikipedia.org/api/rest_v1/page/mobile-sections/Hipotiroidismo/50805952

Actual page: https://pt.wikipedia.org/wiki/Hipotiroidismo

Event Timeline

ssastry subscribed.

This is not a Parsoid problem because https://pt.wikipedia.org/api/rest_v1/page/html/Hipotiroidismo shows that it has content as well. Tagging MCS instead.

In this article the references template comes at the end of the lead section:

{{referências|col=2}}

So Parsoid gives us:

<section data-mw-section-id="0">
lead section text
<h2 style="cursor: help;" title="Esta seção foi configurada para não ser editável diretamente. Edite a página toda ou a seção anterior em vez disso." about="#mwt54" typeof="mw:Transclusion" id="Referências" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;referências&quot;,&quot;href&quot;:&quot;./Predefinição:Referências&quot;},&quot;params&quot;:{&quot;col&quot;:{&quot;wt&quot;:&quot;2&quot;}},&quot;i&quot;:0}}]}"><span id="Refer.C3.AAncias" typeof="mw:FallbackId"></span>Referências</h2>
</section>

When MCS encounters the <h2> it tries to start a new section and blows the old section info away. I'm not sure how often this happens. I'm looking to come up with a better way to handle this case.

Change 472790 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/mobileapps@master] mobile-sections: fix issue with missing section text

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

Change 472790 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] mobile-sections: fix issue with missing section text

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