Page MenuHomePhabricator

Title::newMainPage() doesn't split parser cache by UI language when $wgForceUIMsgAsContentMsg = ['mainpage']
Open, Needs TriagePublic


A bare local interwiki, for example [[c:]] on Commons, will point to the main page (

However, Commons has $wgForceUIMsgAsContentMsg = ['mainpage'] set, which means that the mainpage message, and therefore the main page itself, is different based on the user's UI language. So if I have my UI language set as de, the parser will turn [[c:]] into a link to But it does not record the users' language as being used in the parser cache, so regardless of what language you visit with, that page will link to the German main page.

Originally introduced in T66167: Local interwiki links with no page title should point to the main page. Semi-related is T297571: CVE-2022-28201: Title::newMainPage() goes into an infinite recursion loop if it points to a local interwiki.