Page MenuHomePhabricator

Incorrect use of wfMsg in Linker.php, or parser cache bug
Closed, ResolvedPublic

Description

Author: lowzl

Description:
In Linker.php we have

$defaults['title'] = wfMsg( 'red-link-title', $target->getPrefixedText() );

which causes the tooltip text "$1 (page does not exist)" to be translated to the user's interface language. This seems reasonable enough, but unfortunately this also gets saved into the parser cache. As such, other users may see the link title translated into the wrong language. It seems that the right thing to do is to use wfMsgForContent instead of wfMsg.

To reproduce, change the interface language to, say, Interlingua, and save an edit to any (new) page with red links. The red links will have their tooltip text in Interlingua even when viewed anonymously. For some reason I have difficulty reproducing this problem on pages which already exist.


Version: unspecified
Severity: minor

Details

Reference
bz33630

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:05 AM
bzimport set Reference to bz33630.
bzimport added a subscriber: Unknown Object (MLST).

lowzl wrote:

This seems to be the same as bug 32686, actually. Apologies. (But I'm having the problem in MediaWiki 1.18, not 1.19.)

  • This bug has been marked as a duplicate of bug 32686 ***