api call is
action: 'query', list: 'recentchanges', rctoken: 'patrol', rclimit: 1
this is done through a script.
the script is:
snippet of the script is:
mw.loader.using('mediawiki.api', function() {
function tokenReceived(data) {
var token = data.query.recentchanges[0].patroltoken;
// do something with token - usually mark some edits as "patrolled".
}
var api = new mw.Api()
api.get({ list: 'recentchanges', rclimit: 1, rctoken: 'patrol')
}); // using
recently this call intermittently generates a result where "data.query.recentchanges[0]" has no token field, and "data" grows a new field: "warnings", such that "data.warnings.recentchanges['*']" is the string
"Action 'patrol' is not allowed for the current user".
(even though the logged in user has "patroller" rights)
this seems to be an intermittent error - sometimes it actually returns a good token.
Version: 1.24rc
Severity: minor