Last modified: 2012-08-04 21:10:42 UTC
Created attachment 9719 [details] AFTv5 Query Error Screenshot when Posting on en.labs 12-15 We consistently get a database query error message when trying to post feedback on en.labs.wikipedia.org. To reproduce , click on the text field of any feedback form on en.labs.wikipedia.org, then type a few words in the comments box, then click on 'Post your feedback'. A red message appears below 'Help improve this article' (see attached screenshot). Kudos to Erik Moeller for being the first to report this bug. This appeared to be working in a previous version of the code on en.labs.wikipedia.org.
Note that Erik experienced this bug on Chrome and Unbuntu. Fabrice can reproduce on Safari for Mac, but not Firefox or Chrome, which work as expected for all forms on this Golden-crowned Sparrow page: http://en.labs.wikimedia.org/wiki/Golden-crowned_Sparrow?bucket=1 Yoni says: "Since the latest code works properly on prototype, and I don't have access to the database on labs - I will work with Roan tomorrow morning to resolve it. It most probably boils down to synchronizing the database schema to the deployed revision of the code."
From: Erik Moeller Date: December 15, 2011 6:31:13 PM PST To: Fabrice Florin Cc: Yoni Shostak, Roan Kattouw, Howie Fung Subject: Re: AFTv5: Query error This is Chrome 15. Here's the API response when submitting a comment: HTTP/1.0 200 OK Date: Fri, 16 Dec 2011 02:23:58 GMT Server: Apache X-Content-Type-Options: nosniff Cache-Control: private MediaWiki-API-Error: internal_api_error_DBQueryError Content-Encoding: gzip Vary: Accept-Encoding Content-Length: 454 Content-Type: application/json; charset=utf-8 X-Cache: MISS from sq34.wikimedia.org X-Cache-Lookup: MISS from sq34.wikimedia.org:3128 X-Cache: MISS from sq76.wikimedia.org X-Cache-Lookup: MISS from sq76.wikimedia.org:80 Connection: keep-alive {"servedby":"srv251","error":{"code":"internal_api_error_DBQueryError","info":"Database query error","*":"\n\n#0 \/usr\/local\/apache\/common-local\/php-1.18\/includes\/db\/Database.php(814): DatabaseBase->reportQueryError('Column 'af_user...', 1048, 'INSERT INTO `a...', 'DatabaseBase::i...', false)\n#1 \/usr\/local\/apache\/common-local\/php-1.18\/includes\/db\/Database.php(1600): DatabaseBase->query('INSERT INTO `a...', 'DatabaseBase::i...')\n#2 \/usr\/local\/apache\/common-local\/php-1.18\/extensions\/ArticleFeedbackv5\/api\/ApiArticleFeedbackv5.php(483): DatabaseBase->insert('aft_article_fee...', Array)\n#3 \/usr\/local\/apache\/common-local\/php-1.18\/extensions\/ArticleFeedbackv5\/api\/ApiArticleFeedbackv5.php(44): ApiArticleFeedbackv5->newFeedback(Array)\n#4 \/usr\/local\/apache\/common-local\/php-1.18\/includes\/api\/ApiMain.php(692): ApiArticleFeedbackv5->execute()\n#5 \/usr\/local\/apache\/common-local\/php-1.18\/includes\/api\/ApiMain.php(358): ApiMain->executeAction()\n#6 \/usr\/local\/apache\/common-local\/php-1.18\/includes\/api\/ApiMain.php(342): ApiMain->executeActionWithErrorHandling()\n#7 \/usr\/local\/apache\/common-local\/php-1.18\/api.php(115): ApiMain->execute()\n#8 \/usr\/local\/apache\/common-local\/live-1.5\/api.php(3): require('\/usr\/local\/apac...')\n#9 {main}\n\n"}}
MySQL error code 1048 is "column cannot be null". Looks like the code is attempting to set user_ip to NULL anyway, so I'll make it nullable.
Fixed in r106428, schema change applied on the cluster.