Last modified: 2010-05-15 16:03:47 UTC
After a successful page edit using action=edit, the server returns an HTTP 500 code (with an empty body) instead of a normal response. This was encountered on http://test.wikipedia.org repeatedly. (Note that edits that fail for various reasons return proper error/failure messages.)
This bug appears to have been introduced between r33962 and r35960, although I am unable to diagnose further.
Every edit? Some edits? Repeatable consistently? Example client code? Sample output of the error page?
Created attachment 4964 [details]
Attached a sample script using <http://mwclient.sourceforge.net/>.
The result is a plain 500 without any body text.
Confirm this on test.wikipedia.org, but not on my home wiki with SVN HEAD.
Produced the following result: http://test.wikipedia.org/w/index.php?title=Sandbox&diff=60322&oldid=60321
but returned an empty page with HTTP 500.
I'm unable to produce a successful edit with Bryan's sample code.
Running configured site config
Site has writeapi: True
Traceback (most recent call last):
File "basic_edit_test.py", line 39, in <module>
File "/Users/brion/src/mwc/mwclient/page.py", line 133, in save
raise errors.EditError(self, result['edit']['result'])
mwclient.errors.EditError: (<Page object 'Testothing/text1' for <Site object 'test.wikipedia.org/w/'>>, u'Failure')
Tried for a few minutes to whip together an api-based test edit script, but it seems to be a royal pain in the ass with cookie-based auth. Provide a sample script that works and we can try looking for errors. :)
Created attachment 4970 [details]
Edit in browser test
Hmm odd. I unfortunately don't have time to debug that script.
How about the nice and shiny attached HTML form to use the edit api?
Or just send this to the server:
POST /w/api.php?action=edit&format=xml&title=Sandbox&summary=API%20test&text=API%20TEST&token=%2B%5C HTTP/1.0
User-Agent: Bugzilla 14443
I was able to duplicate the bug using Bryan's web form (comment #5 above). I used the form to create a new page; this edit was successful and returned a normal HTTP 200 response. However, using the form to edit the same page caused an HTTP 500. The edit was successful on the wiki, but the web server did not return an appropriate response.
Regression due to r35696, fixed in r36159.