[go: up one dir, main page]

Page MenuHomePhabricator

Please add "Module talk" as an alias of ns:829(jawiki and jawikivoyage)
Closed, ResolvedPublic

Description

Jawiki is using "モジュール‐ノート" as Ns:829.
According to mw:manual:Namespace, "(canonical prefix) works on all wikis regardless of configuration.".
But at jawiki, "Module talk" does not work.
typing {{NAMESPACENUMBER:Module talk:A}} returns 0, So I guess it simply treated as main namespace.
I'm requesting Module talk: to be added as alias of ns:829.
Also, same problem is happning on jawikivoyage, too.
Thank you.

Event Timeline

Change 817929 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] ja(wiki|wikivoyage): Add "Module talk" as alias of NS829

https://gerrit.wikimedia.org/r/817929

Change 817929 merged by jenkins-bot:

[operations/mediawiki-config@master] ja(wiki|wikivoyage): Add "Module talk" as alias of NS829

https://gerrit.wikimedia.org/r/817929

Reverted in https://gerrit.wikimedia.org/r/818056/, as it doesn't work as expected. This seems to be a bug of that extension itself or something else?

03:48:24 <PleaseStand> I tested using WikimediaDebug on mwdebug1001, and koi's patch doesn't seem to work
03:49:00 <PleaseStand> If what the author of the Phab task is saying is correct, there should be no need for special site configuration, and the bug lies elsewhere

@Q8j: In the future, please always follow https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes when requesting such site configuration changes. Thanks!

API query that shows the issue: https://ja.wikipedia.org/w/api.php?action=query&meta=siteinfo&formatversion=2&siprop=namespaces%7Cnamespacealiases

Notice that the value of "canonical" is wrong for namespace ID 829 (should be "Module talk" rather than equal to the value of "name"). I was able to reproduce the issue locally by copying relevant config settings ($wgLanguageCode, $wgExtraNamespaces and $wgNamespaceAliases) from InitialiseSettings.php to the LocalSettings.php file of a test wiki.

InitialiseSettings.php overrides the name of this namespace (see T49933) using $wgExtraNamespaces, which MediaWiki.org seems to indicate should work. Unfortunately, this does not work correctly for namespaces registered using extension.json.

Specifically, in includes/SetupDynamicConfig.php, the namespace names from $wgExtraNamespaces are added to $wgCanonicalNamespaceNames. Canonical names of core namespaces already exist in the array, so are not replaced. Names of extension namespaces, however, do not already exist in the array.

NamespaceInfo::getCanonicalNamespaces() already adds the namespaces from $wgExtraNamespaces to its list in such a way that canonical names defined by extensions are not overridden, and not much code reads $wgCanonicalNamespaces directly anymore (see code search), so maybe the simplest fix is to remove that "UGLY UGLY" code from SetupDynamicConfig.php.

Change 818110 had a related patch set uploaded (by PleaseStand; author: PleaseStand):

[mediawiki/core@master] Don't add $wgExtraNamespaces to $wgCanonicalNamespaceNames

https://gerrit.wikimedia.org/r/818110

@Q8j: In the future, please always follow https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes when requesting such site configuration changes. Thanks!

@Aklapper Understood, I'll do that from now on. Thanks for letting me know.

Change 818110 merged by jenkins-bot:

[mediawiki/core@master] Don't add $wgExtraNamespaces to $wgCanonicalNamespaceNames

https://gerrit.wikimedia.org/r/818110

Change 818596 had a related patch set uploaded (by PleaseStand; author: PleaseStand):

[mediawiki/core@master] Add release notes for 1636c24306b9fa5c

https://gerrit.wikimedia.org/r/818596

Change 818596 merged by jenkins-bot:

[mediawiki/core@master] Add release notes for 1636c24306b9fa5c

https://gerrit.wikimedia.org/r/818596

My patch to MediaWiki appears to have fixed the reported problem on jawikivoyage. It is expected to be deployed to jawiki tomorrow at around 18:00 UTC (see deployment calendar) as part of 1.39.0-wmf.23.

1.39.0-wmf.23 was deployed, and it appears to have fixed the reported problem on jawiki.

There were 12 rows in jawiki's pagelinks table having pl_namespace = 0 and pl_title like 'Module_talk:%'. I fixed these using an API purge with the "forcelinkupdate" option set (similar to a null edit).

https://quarry.wmcloud.org/history/66404/676328/656786