Last modified: 2013-06-24 16:16:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50201, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48201 - API: action=parse should default to wikitext contentmodel if no title given
API: action=parse should default to wikitext contentmodel if no title given
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.21.x
All All
: High major (vote)
: 1.21.x release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-07 09:27 UTC by Niklas Laxström
Modified: 2013-06-24 16:16 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2013-05-07 09:27:13 UTC
http://www.wikidata.org/w/api.php?action=parse&format=json&text=%5B%5BSpecial%3AUserLogin%7CLog+in%5D%5D+to+select+a+different+language+for+menus%2E

returns:
{"servedby":"mw1193","error":{"code":"parseerror","info":"failed to deserialize"}}

This affects among other things the Universal Language Selector and the Translate extensions which rely on it to produce part of the interface.
Comment 1 Aude 2013-05-07 09:34:56 UTC
You can append "&contentmodel=wikitext" and then it works.  

Since Wikidata has items in the main namespace, then it appears to assume json content model and can't parse the text.
Comment 2 Niklas Laxström 2013-05-09 19:21:51 UTC
I would consider this high priority.
Comment 3 Andre Klapper 2013-05-10 02:28:13 UTC
(In reply to comment #2)
> I would consider this high priority.

Well, there is a simple workaround in comment 1.
Comment 4 Nemo 2013-05-10 05:48:06 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I would consider this high priority.
> 
> Well, there is a simple workaround in comment 1.

The workaround can't be used by users to make ULS and Translate work again, so it's useless. :)
I think this bug is about restoring expected behaviour and avoid this breaking change in the API?
Comment 5 Bawolff (Brian Wolff) 2013-05-10 06:03:18 UTC
It doesn't seem unreasonable for action=parse to assume a wikitext content model in the case its asked to parse content and is not given a context title, and the page "Api" would be in a different content model then wikitext.
Comment 6 Andre Klapper 2013-05-10 11:30:28 UTC
Thanks for comments/explanations (very appreciated). 
So I'll set it to high prio now, to be on the safe side.
Comment 7 Gerrit Notification Bot 2013-06-19 10:23:00 UTC
Related URL: https://gerrit.wikimedia.org/r/69470 (Gerrit Change Ie4f7324c2a10700e52dadc4facd6b4fe6c76cf48)
Comment 8 Gerrit Notification Bot 2013-06-19 10:54:33 UTC
Related URL: https://gerrit.wikimedia.org/r/69472 (Gerrit Change I51143873e3782df4df500194a7ac71c4b446746b)
Comment 9 Brad Jorsch 2013-06-24 14:26:53 UTC
Gerrit change #69470 (and the followup Gerrit change #69494) were merged on the 19th.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links