The links on (eg) https://en.m.wikipedia.org/wiki/Duria_Antiquior?useparsoid=1 go to en.wikipedia.org not en.m.wikipedia.org. This is probably due to MediaWiki\OutputTransform\Stages\ExpandToAbsoluteUrls, which Parsoid uses by default and legacy doesn't -- but that stage just calls Linker::expandLocalLinks which uses wfExpandUrl so there is perhaps something wrong with how MFE is setting up the hostname?
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Get mobile url for Parsoid's baseHref | mediawiki/core | master | +10 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | ovasileva | T269499 [Epic] Make MobileFrontend compatible with Parsoid HTML | |||
Resolved | ABreault-WMF | T365483 Links from mobile go back to desktop host when using Parsoid Read Views |
Event Timeline
This is probably due to MediaWiki\OutputTransform\Stages\ExpandToAbsoluteUrls, which Parsoid uses by default and legacy doesn't -- but that stage just calls Linker::expandLocalLinks which uses wfExpandUrl so there is perhaps something wrong with how MFE is setting up the hostname?
It looks like ExpandToAbsoluteUrls runs based on whether absoluteURLs is set, and there's no Parsoid distinction. However, an earlier stage, ExtractBody, which is Parsoid only, has its own expandRelativeAttrs that it runs using the $baseHref that is extracted from the head of the document. Parsoid gets that from SiteConfig::baseURI() which pulls it from MainConfigNames::Server.
Change #1037106 had a related patch set uploaded (by Arlolra; author: Arlolra):
[mediawiki/core@master] [WIP] Get mobile url for Parsoid's basehref
Change #1037106 merged by jenkins-bot:
[mediawiki/core@master] Get mobile url for Parsoid's baseHref