Page MenuHomePhabricator

Incorrect namespace displayed in ns4 page title on Chinese Wikiquote and Wikivoyage
Closed, DuplicatePublic

Description

https://zh.wikivoyage.org/wiki/Special:ApiSandbox#action=query&format=json&meta=siteinfo&utf8=1&siprop=namespacealiases

Steps to reproduce:

  1. Open any page in project namespace on Chinese Wikiquote or Wikivoyage, for example the Wikiquote one and the Wikivoyage one
  2. Set the Content language variant to anything other than zh in Special:Preferences, for example zh-Hans - 中文(简体)
  3. Reload the page and look at the namespace part of the page title. It will randomly show 维基新闻, 维基文库, 维基语录, 维基导游 or 维基教科书 (may not complete).
  4. Reload the page again and the namespace may change. If not, try purging the page or visiting another project page and look at the namespace part in page title.

Notes:

  • 维基新闻, 维基文库, 维基语录, 维基导游 or 维基教科书 are translated as Wikinews, Wikisource, Wikiquote, Wikivoyage and Wikibooks, respectively. In other words, these page titles are shown as if they are in another project.
  • The correct namespace alias should be 维基语录 (or 維基語錄) and 维基导游 (or 維基導遊) for Wikiquote and Wikivoyage, as per the meta=siteinfo API result.
  • Things work fine if the content language variant is set to zh.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 12 2020, 7:36 AM
Aklapper changed the task status from Open to Stalled.Mar 12 2020, 10:53 AM

Hi @WhitePhosphorus, thanks for taking the time to report this! Unfortunately this Wikimedia Phabricator task lacks some information.
If you have time and can still reproduce the situation: Please add a more complete description to this task. That should be

  • a clear list of exact steps to reproduce the situation, step by step, so that nobody needs to guess or interpret how you performed each step,
  • what happens after performing these steps to reproduce,
  • what you expected to happen instead,
  • a full link to a web address where the issue can be seen.

In some situations it can also be helpful to know if you see the same behavior when you are not logged in, your web browser(s) and web browser version(s), your exact MediaWiki version (if it is not on a Wikimedia wiki) and PHP version, etc.

You can edit the task description by clicking Edit Task. Ideally, a good description should allow any other person to follow these steps (without having to interpret steps) and see the same results. Problems that others can reproduce can get fixed faster. We appreciate people who report issues, so thanks again!

WhitePhosphorus renamed this task from Incorrect project page title on Chinese Wikiquote and Wikivoyage to Incorrect namespace displayed in ns4 page title on Chinese Wikiquote and Wikivoyage.Mar 12 2020, 12:21 PM
WhitePhosphorus updated the task description. (Show Details)

@Aklapper, I've done some additional tests and revised the task description. Please let me know if there is anything still vague. Sorry for being unclear before.

A simple script to reproduce this bug.

1import re
2import requests
3
4S = requests.Session()
5URL = 'https://zh.wikivoyage.org/w/api.php'
6PARAMS = {
7 'action': 'purge',
8 'titles': 'Wikivoyage:互助客栈',
9 'format': 'json'
10}
11
12cnt = 0
13while True:
14 cnt += 1
15
16 # Get page title
17 req = requests.get('https://zh.wikivoyage.org/zh-tw/Wikivoyage:互助客栈')
18 html = req.text
19 m = re.search(r'<title>(.+?)</title>', html)
20 if m:
21 print(cnt, m.group(1))
22
23 # Purge page
24 R = S.post(url=URL, params=PARAMS)

WhitePhosphorus changed the task status from Stalled to Open.Mar 15 2020, 5:26 PM

As the description has been elaborated, I'm changing the status back to open.

Shizhao moved this task from Backlog to Closed on the Chinese-Sites board.Mar 19 2020, 3:41 AM