Page MenuHomePhabricator

Pages containing categories in language variants prefixed with a valid namespace links to that namespace
Open, Needs TriagePublicBUG REPORT

Description

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

  • Have a page in a valid non-category namespace (e.g. zhwiki:Wikipedia:裸網址)
  • Create a page with that page in language variants as a category (e.g. [[Category:Wikipedia:裸网址]] in my sandbox on zhwiki)
  • Check the category bar of the page created.

What happens?:

A blue link to that non-category page was generated in the category bar.

What should have happened instead?:

This bad category should be a red link to the category namespace.

Software version (skip for WMF-hosted wikis like Wikipedia):

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

While working on T328477, I noticed this issue. This is not a valid use case, but we should avoid this confusing behaviour.
And the findVariantLink() function was used in more important places.

Event Timeline

Change 887962 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Keep the namespace unchanged for findVariantLink()

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

On 2024-01-27 13:13 (UTC), Aca wrote:

Edgar and I found some pretty strange categories on sh.WP, and we think they might be related to LanguageConverter or some of the patches deployed earlier.

They can be found on the last page of Wanted categories special page.

Specifically, I'm referring to:

Seems like they are populated by pages that don't exist (?)