Page MenuHomePhabricator

Babel boxes in editnotices display unparsed wikitext
Open, LowPublic


I have a babelbox at
"{{#babel:nl|en-3|de-1|fr-1||||||}}". That works.

I also have an edit notice at .
It has the same babelbox and if you look at it as a normal page, it works.

When you open you'll see the edit notice and there German is broken:
"{{GENDER:Multichill|Dieser Benutzer|Diese Benutzerin|Dieser Benutzer}}"

The last change was (2011) and the message (2010) and I'm pretty sure it worked the last years, I just noticed it today.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:02 AM
bzimport set Reference to bz54347.
bzimport added a subscriber: Unknown Object (MLST).

Ehr... Pretty weird. No idea off the top of my head why this is happening.

TTO added a project: MediaWiki-Parser.EditedJan 28 2016, 12:40 PM
TTO added a subscriber: TTO.

This occurs because the editnotice is a system message, which is parsed using MessageCache::singleton()->parse(). While parsing the editnotice, the babel box is encountered, causing the babel messages like "This user has a native understanding of English" to be parsed using wfMessage, which calls MessageCache::singleton()->transform(). But the message cache singleton is already in parsing mode (from the editnotice system message), so it simply returns the text of the babel message without parsing.

The fact that MessageCache uses global state like this suggests that this is a deep-seated architectural issue with the PHP parser, and I don't think we can do a whole lot about it other than anticipate the coming of a new parsing service.

I haven't looked back in the git history to see if this worked correctly under old MW versions, as Multichill suspected.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 28 2016, 12:40 PM
TTO renamed this task from {{GENDER}} stopped working in editnotice to Babel boxes in editnotices display unparsed wikitext.Jan 28 2016, 12:41 PM
TTO lowered the priority of this task from Normal to Low.
TTO set Security to None.
TTO removed a subscriber: wikibugs-l-list.