Page MenuHomePhabricator

mw.config.values.wgCategories is undefined on the mobile site
Open, MediumPublicBUG REPORT

Description

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

What happens?:
The output is undefined.

What should have happened instead?:
The output is ['Wiktionary']

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Tested on Microsoft Edge 126.0.2592.113

image.png (94×379 px, 5 KB)

Event Timeline

Categories are not displayed on mobile for anons and the associated config has been intentionally disabled since 2015 via https://gerrit.wikimedia.org/g/mediawiki/extensions/MobileFrontend/+/438b5e888068032ac1bcccce118e3cb05a0228ac/includes/MobileFrontendHooks.php#1150 to reduce code bloat (T121791). They are only available to users using the advanced mode.

For now you could check for undefined and then request them via the API as needed.

Jdlrobson triaged this task as Medium priority.Jul 24 2024, 10:22 PM

Categories are not displayed on mobile for anons and the associated config has been intentionally disabled since 2015 via https://gerrit.wikimedia.org/g/mediawiki/extensions/MobileFrontend/+/438b5e888068032ac1bcccce118e3cb05a0228ac/includes/MobileFrontendHooks.php#1150 to reduce code bloat (T121791). They are only available to users using the advanced mode.

For now you could check for undefined and then request them via the API as needed.

Not being displayed is one thing, but even in advanced mode where they are being displayed, they are still missing from mw.config, which breaks scripts, especially since mw.config is available immediately while mediawiki.api isn't.