Last modified: 2010-05-15 16:03:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14443 - successful edit causes server to return HTTP 500
successful edit causes server to return HTTP 500
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
Depends on:
  Show dependency treegraph
Reported: 2008-06-06 15:40 UTC by Russell Blau
Modified: 2010-05-15 16:03 UTC (History)
4 users (show)

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

Edit test (1.25 KB, text/plain)
2008-06-07 11:16 UTC, Bryan Tong Minh
Edit in browser test (401 bytes, text/plain)
2008-06-10 08:29 UTC, Bryan Tong Minh

Description Russell Blau 2008-06-06 15:40:09 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 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.
Comment 1 Brion Vibber 2008-06-06 15:42:28 UTC
Every edit? Some edits? Repeatable consistently? Example client code? Sample output of the error page?
Comment 2 Bryan Tong Minh 2008-06-07 11:16:40 UTC
Created attachment 4964 [details]
Edit test

Attached a sample script using <>.

The result is a plain 500 without any body text.
Comment 3 Max Semenik 2008-06-07 15:32:10 UTC
Confirm this on, but not on my home wiki with SVN HEAD.

POST: &md5=770ce8a34322c7c20271c43396a6e141&summary=API+test&timestamp=2008-06-07T15%3a23%3a55Z&text=API+TEST%0a%0auh.....%0a%0a%3d%3d+Section+One+%3d%3d%0aTest%0a%3d%3d+Section+Two+%3d%3d%0aTest%0a%0a%7b%7bUC%3a%7b%7bFULLPAGENAME%7d%7d+%7d%7d&token=5ef49b2e44f207eee65f22771c19226d%2b%5c

Produced the following result:
but returned an empty page with HTTP 500.
Comment 4 Brion Vibber 2008-06-09 22:28:30 UTC
I'm unable to produce a successful edit with Bryan's sample code.

Running configured site config
Site has writeapi: True
Editting page1
Traceback (most recent call last):
  File "", line 39, in <module>, comment1)
  File "/Users/brion/src/mwc/mwclient/", line 133, in save
    raise errors.EditError(self, result['edit']['result'])
mwclient.errors.EditError: (<Page object 'Testothing/text1' for <Site object ''>>, 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. :)
Comment 5 Bryan Tong Minh 2008-06-10 08:29:09 UTC
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?
Comment 6 Platonides 2008-06-10 11:30:01 UTC
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
Content-length: 0
Comment 7 Russell Blau 2008-06-10 12:55:01 UTC
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.
Comment 8 Tim Starling 2008-06-10 16:19:44 UTC
Regression due to r35696, fixed in r36159.

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