Page MenuHomePhabricator

Sections are not displayed in table of contents in Android App (Chinese only)
Closed, DuplicatePublicBUG REPORT

Description

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

  • Open any article in Chinese language on the latest Android Mobile App
  • Open the table of contents (swipe left)

What happens?:
The table of contents fail to load the sections of the article. Instead, only title and a section named "About this article" is loaded

What should have happened instead?:
Please refer to the English version of the article: https://en.wikipedia.org/wiki/Apple. Table of contents should load sections like "Etymology", "Description"...

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
2.7.50495-r-2024-07-23

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

  1. The issue is only reproducible in Chinese language. I have tested on Japanese, English, French. The issue is not reproducible on the languages other than Chinese.
  2. The issue is reproducible on any Chinese variants, including zh-Hant-HK, zh-Hans-CN, zh-Hant-TW
  3. I have tried to trace the bug myself first. I trace until this line: https://github.com/wikimedia/apps-android-wikipedia/blob/c495b09cf4d5a99025c403e453729082a5e11e5e/app/src/main/java/org/wikipedia/bridge/JavaScriptActionHandler.kt#L50 .

I found out that in Chinese pages, the response in the web view is always an empty array. However, in English(and other languages), the response is correctly populated.

WebView response in Chinese:

Screenshot 2024-08-10 at 21.57.48.png (1×2 px, 647 KB)

WebView response in English:

Screenshot 2024-08-10 at 21.58.20.png (1×2 px, 1 MB)