Page MenuHomePhabricator

LanguageConverter not invoked when Parsoid search link targets
Closed, DuplicatePublicBUG REPORT

Description

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

  • Create a page in a script/variant (e.g. w:zh:泰德·莱昂西斯, title in Simplified Chinese).
  • On another page, link to it in another script/variant (e.g. [[泰德·萊昂西斯]], in Traditional Chinese). Make sure the page itself does not technically exist.
  • Use the new (Parsoid) parser.
  • In this example, zh-hant 萊 is U+804A and zh-hans 莱 is U+83B1

What happens?: The link is shown as a red link.

What should have happened instead?: The system should search for the same title in alternative scripts/variants and correctly identify it as a blue link. This is the behavior of the legacy parser.

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

Other information (browser name/version, screenshots, etc.): Reproducible in Sandbox under following circumstances:

  • Basic wikitext: 94086911.
  • With __NOCC__ magic word: 94086872
    • (another issue: __NOCC__ is disregarded on Parsoid) Seems the text itself is not converted as expected when pp.pp_propname IN ('notitleconvert').
    • However, we should still convert when parsing the inter-link to avoid red-link.
  • (Good, no redlink) Wrapping the whole body text with -{}- markers: 94086833
    • A new issue: The original link is broken (/w/$1, or ./$1 as intended in href) and the alternative link is correct (/wiki/$1). Subtask of this phenomenon: T381140

Event Timeline

Restricted Application added subscribers: Stang, Aklapper. · View Herald Transcript
Bewfip subscribed.

I brought up the NOCC behaviour change in T429060 for reconsideration. I guess the issue for links inside -{}- could be a regression resulting from T422962, as it touched the topic.

T400140 is confirmed to be still present now, but this task's example also present issues like href attr in T417527/T405158 (see subtask for VE behavior) and lang attr behavior like T39617.

Thus merge the mentioned wrongly-closed task here.

Tiger3018 updated the task description. (Show Details)
Bewfip raised the priority of this task from High to Needs Triage.Sep 12 2026, 12:35 PM
Bewfip removed subscribers: ZhaoFJx, ABreault-WMF, cscott, Helloworld2B.

Playing Aklapper's lines: Please don't triage the issue unless you plan to work on it. See https://www.mediawiki.org/wiki/Phabricator/Project_management#Setting_task_priorities

Tiger3018 changed the task status from Open to In Progress.EditedThu, Sep 17, 6:57 AM

Most of them seem to be already resolved by T380517: Make Parsoid language conversion into an OutputTransform pass, see RESTv1 with Parsoid's LC: https://zh.wikipedia.org/w/rest.php/v1/revision/88393427/html, https://zh.wikipedia.org/w/rest.php/v1/revision/94086911/html and https://zh.wikipedia.org/w/rest.php/v1/revision/94086872/html.

However, the title(all of them) and href(only outside wrapping) attribution is over-converted, which can result in red-link again, like https://zh.wikipedia.org/w/rest.php/v1/revision/94403324/html.(Accept-Language: should not be any of zh-hant variant to see the red-link) Noted the ./$1 issue is still present,