Page MenuHomePhabricator

action=raw on MediaWiki namespace returns 404 if the page has been deleted
Closed, ResolvedPublic

Description

I'd expect it to return the contents of the page from the i18n files, since that's what I see when I view it without action=raw


Version: unspecified
Severity: enhancement
URL: http://ta.wikipedia.org/wiki/மீடியாவிக்கி:Mainpage?action=raw

Details

Reference
bz36307

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 12:28 AM
bzimport set Reference to bz36307.
bzimport added a subscriber: Unknown Object (MLST).

Wouldn't the world be a nicer place if action=raw just didn't exist anymore? ;-)

Krenair's suggestion of using usemsgcache=true along with action=raw works :)

I'm unsure what the desired behavior here is. Should usemsgcache=true be assumed for MediaWiki namespace?

Wouldn't the world be a nicer place if we didn't fake the existence of pages in mediawiki namespace?

I looked a bit more and realized that usemsgcache=true will return data from the i18n cache and not count for overrides. So that negates what was said in #c2. However, I still think usemsgcache=true should be assumed if the page does not exist.

Wouldn't the world be a nicer place if action=raw and action=view were consistent? :)

(In reply to comment #4)

Wouldn't the world be a nicer place if action=raw and action=view were
consistent? :)

And is this really an "Internationalisation" request? Looks not: sending to General.
Also, per comment 3 this borders WONTFIX: turning to lowest priority.

(In reply to comment #5)

Also, per comment 3 this borders WONTFIX: turning to lowest priority.

Before doing exactly that: what is the real life use case for this?

The use case is when you want the raw data of a translated message used by mediawiki.

The particular case was, I was trying to find out the localized Main Pages of all wikis. If you hit https://ta.wikipedia.org/wiki/%E0%AE%AE%E0%AF%80%E0%AE%9F%E0%AE%BF%E0%AE%AF%E0%AE%BE%E0%AE%B5%E0%AE%BF%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%BF:Mainpage?action=view you will see that it is returned as "முதற் பக்கம்", which is picked up from the i18n cache. The logic for this page's contents seem to be: 1. if that particular page exists (Mediawiki:<something>) return that, else return value of <something> from message cache.

This mostly works for action=raw too - for example, https://en.wikipedia.org/wiki/MediaWiki:Mainpage?action=raw returns appropriate response, consistent with action=view

However, https://ta.wikipedia.org/wiki/%E0%AE%AE%E0%AF%80%E0%AE%9F%E0%AE%BF%E0%AE%AF%E0%AE%BE%E0%AE%B5%E0%AE%BF%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%BF:Mainpage?action=raw returns a 404 - the only change being action=view to action=raw. It turns out that on tawiki, at some previous point the custom page existed, but was hence deleted. Hence while action=view falls back appropriately to the i18n cache, action=raw does not, and returns a 404.

@saper, do you think this would take 2-3 weeks to an experience developer? Looks like a simpler task?

Krinkle claimed this task.
Krinkle added a subscriber: Krinkle.

This task represents the request of a new feature, to expose the default value of interface messages, as shown on MediaWiki-namespace page views, to a JavaScript program or HTTP client.

I am closing this request, because this feature has already been implemented via the API. Providing another way, via action=raw, would not be useful, and would add a cost of maintaining two APIs.

For examples of how to use this API in a user script or gadget, see: