Page MenuHomePhabricator

Database Error when Creating DMCA Takedown
Closed, ResolvedPublic1 Estimated Story Points


When creating a DMCA Takedown @Jalexander ran into this error:

An exception occurred while executing 'INSERT INTO takedown_dmca (lumen_id, lumen_title, sender_name, sender_person, sender_firm, sender_address_1, sender_address_2, sender_city, sender_state, sender_zip, sent, method, to, from, subject, body, wmf_title, commons_id, commons_vp_id, takedown_id, sender_country, action_taken) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [300008270, "Boston Testing", "Wikimedia Foundation", "James Alexander", "James Alexander", "149 New Montgomery St. FL6", null, "San Francisco", "CA", "94015", "2017-07-22 20:34:56", "Emnail", "", "", "Take this down!", "Take down this article, it's totally mine!", "DMCA_Boston", null, null, 2, "US", "no"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'to, from, subject, body, wmf_title, commons_id, commons_vp_id, takedown_id, send' at line 1

This may not happen now that file uploads are working properly.

Event Timeline

Thanks David, still got this though the file upload is definitely working now. For the error I'm filling in the the form for DMCA completely and so far have tried either not uploading a file, not sending to Lumen and Not posting to WMF Wiki and still getting the error (though the exact error adjusts since some things are no longer saved in the query). For simplicity writing down exactly what I'm using in case there is any weirdness that's causing it:

Involved User: Jamesofur and Jalexander-WMF
Affected Pages: Boston
Type: DMCA
Metadata: All 4 checked
Action Taken: Yes
Sent: 7/25/2017 4:24PM
Sender Name: James Alexander
Sender Attorney or individual signing: James Alexander
Sender Law Firm or Agent: James Alexander
Sender Address: 149 New Montgomery St. FL6
Sender City: San Francisco
Sender State/Province: CA
Sender Zip/Postal Code: 94105
Sender Country: United States of America
Lume: Send to Lumen: Checked
Lumen title: Boston Testing
Post to Wikimedia Foundation: Checked
WMF Title: Boston Testing

dbarratt moved this task from Ready to Done on the Anti-Harassment (AHT Sprint 3) board.

This should be fixed now, the problem was, was that to, from, and subject are all reserved keywords in mysql:

Odd that it always worked locally though, but adding quotes around those fixed the issue.

dbarratt set the point value for this task to 1.Aug 30 2017, 4:08 PM