Page MenuHomePhabricator

PCS: Move Chinese Wikipedia off using MobileView API
Closed, DuplicatePublic


While looking into this parent ticket, I found that PCS uses the MobileView API for all requests for Chinese Wikipedia ( I'm not sure the history of this, but it complicates the retirement of this system. I'm adding Content Transformers to this ticket, as we're going to need their support to remove this dependency.

From mobile-html.js, line 87 (router.get('/page/mobile-html/:title/:revision?/:tid?', (req, res)):

if (!mobileviewHtml.shouldUseMobileview(req)) {
			return getMobileHtmlFromParsoid(req, res);
		} else {
			return getMobileHtmlFromMobileview(req, res);


function shouldUseMobileview(req) {
	return wikiLanguage.getLanguageCode(req.params.domain) === 'zh';

The code has another path that uses Mobileview for main pages, but that code is only called from the /mobile-sections/ API, which doesn’t seem to be used by Android or iOS anymore.