Page MenuHomePhabricator

Message cache cannot be accessed via action=raw
Closed, ResolvedPublic

Description

I'm trying to emulate wfMsg() and wfMsgForContent() with JavaScript

To do this I need to look for a localized message first as a page, and if that
doesn't exist I must then look in the message cache. If there is no localized
message I must then repeat those two steps but look for the plain (nonlocalized)
message.

Now if you look up a page in the MediaWiki: namespace normally or using
action=render and a page doesn't exist but an entry in the message cache does,
you will get the message cache entry wrapped in a div with
class="noarticletext". The page is still empty for purposes of editing etc.

Such is not the case when using action=raw which is the obvious way to access
the strings by JavaScript - even when using the new usemsgcache=yes parameter.

As an alternative to fixing this bug, an addition to query.php which calls wfMsg
/ wfMsgForContent or some other API for JavaScript to get to the interface
strings in the database would be just as good.


Version: unspecified
Severity: normal

Details

Reference
bz7267

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:25 PM
bzimport set Reference to bz7267.
bzimport added a subscriber: Unknown Object (MLST).

I assume bug referred in above comment counts "just as good". Resolving to Fixed.