Skip Menu |

This queue is for tickets about the MediaWiki-API CPAN distribution.

Report information
The Basics
Id: 39366
Status: resolved
Priority: 0/
Queue: MediaWiki-API

People
Owner: Nobody in particular
Requestors: steve.sanbeg [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



When trying to edit a page in a local wiki, (mediawiki 1.13) I get an error of some sort, but this module doesn't parse the error properly, so I had to modify the the module to get the error. Otherwise, all I see is: malformed JSON string, neither array, object, number, string or atom, at character offset 0 ["<br />n<b>Fatal erro..."] at /usr/local/lib/perl5/site_perl/5.10.0/MediaWiki/API.pm line 225. After my patch, its: Failed to decode message: <br /> <b>Fatal error</b>: Call to a member function isSpecial() on a non-object in <b>/export/home/wiki/public_html/wikimedia/on/extensions/PasswordReset/PasswordReset_body.php</b> on line <b>174</b><br /> at pod.pl line 137 I'm not sure why the API would touch this extension, but the module should display a more reasonable message.
Subject: patch
Download patch
application/octet-stream 808b

Message body not shown because it is not plain text.

Show quoted text
> I'm not sure why the API would touch this extension, but the module > should display a more reasonable message.
You are right. It should handle some errors better. At some point I did wrap the decode in an eval, but I don't know what happened to that change. Thanks for your patch. I will include it in a new version shortly. Good idea to use carp too. I don't know why your error is triggered from the api.php but not from the wiki in general. I can only think the extension hooks into something that the api uses? Best Regards Jools
I've looked into it a bit more. The API doesn't set $wgTitle, which seems to cause problems with some extensions. In PasswordReset, this is only fixed in the trunk, not any of the release snapshots. So the croak will pinpoint what went wrong, and the latest SVN extension fixes the problem. Thanks -Steve
I have uploaded a new version (0.14) which includes your patch. Thanks for the contribution. It should appear shortly. I apologize with the small delay getting this included - but holiday and beer got in the way of things :)