Page MenuHomePhabricator

Extra span at beginning of mobile-sections-lead
Closed, ResolvedPublic

Description

Some pages start with an extraneous <span>. This has the negative consequence of our summary code picking up the incorrect intro paragraph in theses cases if we use mobile-sections-lead as the input[1]. If we use straight Parsoid html that is not an issue.

[1] See patch rGMOA9ce0818f3f29.

Examples

http://localhost:6928/de.wikipedia.org/v1/page/summary/B%C3%BCrgerkrieg_in_Syrien
https://de.wikipedia.org/api/rest_v1/page/mobile-sections-lead/B%C3%BCrgerkrieg_in_Syrien/173442308

"text": "<span><p>Der <b>Bürgerkrieg in Syrien</b>

https://de.wikipedia.org/api/rest_v1/page/html/B%C3%BCrgerkrieg_in_Syrien/173442308

<span about="#mwt1" typeof="mw:Transclusion"

https://bg.wikipedia.org/api/rest_v1/page/mobile-sections-lead/%D0%94%D0%B0%D0%BD%D0%B8%D1%8F/8341068
https://bg.m.wikipedia.org/api/rest_v1/page/mobile-sections-lead/%D0%9E%D0%BB%D0%BE%D0%B2%D0%BE/8055614

How to fix

Replace the first paragraph relocation transform with the page library one for the mobile-sections endpoint.

Event Timeline

We could do the the same as T170584, which means this would be replacing the old relocateFirstParagraph transform with the new one from page-lib.

So this task is about replacing the first paragraph relocation transform with the page library one for the mobile-sections-lead endpoint?

Yes, it's done for the new PCS endpoint. We should also do it for the mobile-sections endpoint. I think this
can come after the content-html endpoint is finished.

Change 461283 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Mobile-sections: Use PCS version of relocateFirstParagraph

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

Change 461283 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Mobile-sections: Use PCS version of relocateFirstParagraph

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

Mentioned in SAL (#wikimedia-operations) [2018-09-24T20:23:46Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@4be131b]: Update mobileapps to badb463 (T187098 T195838)

Mentioned in SAL (#wikimedia-operations) [2018-09-24T20:28:17Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@4be131b]: Update mobileapps to badb463 (T187098 T195838) (duration: 04m 31s)