I'm using the MediaWiki API for the first time, with MediaWiki 1.12.0 and 1.13 alpha. When I perform a "move" or "delete" like this:
http://mywiki/w/api.php?action=move&from=newpage&to=newpage2&rea...
using the "move token" I received from:
http://mywiki/w/api.php?action=query&prop=info&intoken=move&titl...
I always get the result for the first URL (action=move):
unknown_action: Unrecognised value for parameter 'action'
Any suggestions? Thanks. DanB
Daniel Barrett schreef:
I’m using the MediaWiki API for the first time, with MediaWiki 1.12.0 and 1.13 alpha. When I perform a “move” or “delete” like this: _http://__mywiki__/w/api.php?action=move&from=newpage&to=newpage2&... http://mywiki/w/api.php?action=move&from=newpage&to=newpage2&reason=Testing+it%21&token=99835fa819f666114054d7b6210a1bc5%2B%5C using the “move token” I received from: _http://__mywiki__/w/api.php?action=query&prop=info&intoken=move&... http://mywiki/w/api.php?action=query&prop=info&intoken=move&titles=newpage&format=xml I always get the result for the first URL (action=move): unknown_action: Unrecognised value for parameter 'action'
That's because you have to explicitly enable $wgEnableWriteAPI = true; in LocalSettings.php, or action=move doesn't exist (see also api.php?action=help , where action=move doesn't show up).
Roan Kattouw (Catrope)
I have already enabled $wgEnableWriteAPI = true, but the error still occurs. Any other ideas?
DanB
-----Original Message-----
I always get the result for the first URL (action=move): unknown_action: Unrecognised value for parameter 'action'
That's because you have to explicitly enable $wgEnableWriteAPI = true; in LocalSettings.php, or action=move doesn't exist (see also api.php?action=help , where action=move doesn't show up).
Roan Kattouw (Catrope)
Daniel Barrett schreef:
I have already enabled $wgEnableWriteAPI = true, but the error still occurs. Any other ideas?
Check that your MediaWiki version is recent enough to *have* action=move. In other words, check if includes/api/ApiMove.php is present. If not, upgrade.
Roan Kattouw (Catrope)
Hmmm, I'm running the official 1.12.0 and ApiMove.php is indeed present. The docs at http://www.mediawiki.org/wiki/API:Edit_-_Move say that Move is available in 1.12. Are they wrong?
I just tried 1.13 alpha again, and the error is gone. (I must have forgotten $wgEnableWriteAPI on that wiki last time.)
DanB
-----Original Message----- From: mediawiki-api-bounces@lists.wikimedia.org [mailto:mediawiki-api-bounces@lists.wikimedia.org] On Behalf Of Roan Kattouw Sent: Thursday, May 22, 2008 3:40 PM To: MediaWiki API announcements & discussion Subject: Re: [Mediawiki-api] move: unknown_action: Unrecognised value for parameter 'action'
Daniel Barrett schreef:
I have already enabled $wgEnableWriteAPI = true, but the error still occurs. Any other ideas?
Check that your MediaWiki version is recent enough to *have* action=move. In other words, check if includes/api/ApiMove.php is present. If not, upgrade.
Roan Kattouw (Catrope)
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org