Page MenuHomePhabricator

Investigate Code 414 error when selecting zh-classical (lzh) language from article toolbar
Open, LowPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open any article in the Wikipedia Android app
  • Tap on the language selector in the toolbar
  • Select zh-classical (lzh)
  • Observe the result

What happens?:
A Code 414 error occurs every time the user selects zh-classical (lzh) from the language selector. The article does not load.

What should have happened instead?:
The article should load normally in the selected language (zh-classical), without any error.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
App version: 50579-r-2026-04-14
Device: KYOCERA KYG02 (SDK: 35)
Issue occurs every time
Issue occurs only with zh-classical (lzh), not with other languages

1000001732.png (1,080×2,400 px, 97 KB)

Other information (browser name/version, screenshots, etc.):

I was able to reproduce it.

Event Timeline

The issue is that the lzh.wikipedia.org does not support API requests (e.g. page/summary or feed/featured), but the zh-classical.wikipedia.org works.

If you visit https://lzh.wikipedia.org, you will be redirected to https://zh-classical.wikipedia.org, which means we need to take it to the other team about handling the redirect correctly.

CDanis added a subscriber: MLechvien-WMF.

The issue is that the lzh.wikipedia.org does not support API requests (e.g. page/summary or feed/featured), but the zh-classical.wikipedia.org works.

If you visit https://lzh.wikipedia.org, you will be redirected to https://zh-classical.wikipedia.org, which means we need to take it to the other team about handling the redirect correctly.

@MLechvien-WMF I'm guessing this is something ServiceOps can help with? lzh is implemented as an Apache rewrite, but I'm not sure what else might be needed for API calls to work transparently.

MLechvien-WMF moved this task from Inbox to Needs Info / Blocked on the ServiceOps board.
MLechvien-WMF added subscribers: Raine, Clement_Goubert.

Thanks for surfacing that.

Assigning to @Raine to assess if something should be done on rest gateway side, cc @Clement_Goubert

ABorbaWMF subscribed.

Appears to be fixed on 50586-r-2026-05-12
Tested on:
Pixel 6 on Android 16
OnePlus 8 on Android 13
Galaxy A36

Raine renamed this task from Investigate Code 411 error when selecting zh-classical (lzh) language from article toolbar to Investigate Code 414 error when selecting zh-classical (lzh) language from article toolbar.May 18 2026, 12:08 PM

This appears to be a problem with the Apache redirects, not with rest-gateway (IIUC, rest-gateway should not (and does not) serve lzh.w.o and does serve zh-classical.w.o correctly). Investigating.

It appears that REST API redirects are broken for multiple wikis handled as redirects, but differently in different cases:

e.g. https://nrm.wikipedia.org/api/rest_v1/page/summary/Normaund works but the redirected (nrf => nrm) https://nrf.wikipedia.org/api/rest_v1/page/summary/Normaund returns a 500.

(Therefore, I assume nrf, if available in the Android app, would also be broken.)

Fun times!

Raine triaged this task as Medium priority.May 19 2026, 12:24 PM

Changing priority to Medium as it is no longer affecting the Android app users thanks to the above hotfix. From the ServiceOps viewpoint, this has been broken for a while and is now affecting only API users *except* the android app (probably the biggest consumer).

IIUC, the PR merged above fixes this for the Android app. With that fix in place, this is only affecting API users that use the lzh domain in API calls, which is less than 1 in 1 million of total API calls, and those users are able to switch to using zh-classical. Thus, ServiceOps will for the moment prioritize higher priority tasks and will resume this later in the quarter as capacity allows. Please ping me if you disagree.

MLechvien-WMF lowered the priority of this task from Medium to Low.Jun 1 2026, 9:29 AM

The same problem happens for zh-min-nan. The API call goes to nan.wikipedia.org and fails with a 414 error.

@Raine above you mentioned a hotfix for zh-classical – could the same hotfix be applied to zh-min-nan?

@Raine above you mentioned a hotfix for zh-classical – could the same hotfix be applied to zh-min-nan?

Yes, it will need to be done in the Android app. Tagging @cooltey as he handled the previous one.