Page MenuHomePhabricator

Lexeme form bulk mode crashes upon usage with multiple lines
Open, Needs TriagePublic

Description

I have a set of about 400 lexemes to be created via
https://tools.wmflabs.org/lexeme-forms/template/german-noun-feminine/bulk/
and have tested the workflow successfully with a few of them, e.g.
https://www.wikidata.org/wiki/Lexeme:L232127
and
https://www.wikidata.org/wiki/Lexeme:L232130 .
However, once I am pasting in the full list, the tool keeps giving me a "CSRF error" message, even when I am trying single lines again afterwards.

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptJan 13 2020, 8:20 AM

Should bugs of this tool be reported to here or GitHub? if the later the bug should be exported to GitHub and closed here.

@Daniel_Mietchen from the server logs, it looks like the first time you used bulk mode, it worked – maybe you used the browser’s “back” button after that and then tried to submit the form again? In that case, try if reloading the page first helps. (Tech details: each POST invalidates the CSRF token; reloading the form gives you a new token, whereas going back and submitting the form again reuses the same, now invalid token.)

@Bugreporter: I think some important points here are necessary: 1- Do not assign tickets to people unless they explicitly agreed to getting the ticket resolved, specially to other volunteers 2- Do not mix volunteer and work accounts of people 3- The ticket already had volunteer account of Lucas as subscriber, Do not add people who their accounts is already subscribed to the ticket with another account, at the least, you cause them email spam.

CC. @Aklapper

Daniel_Mietchen added a comment.EditedJan 14 2020, 1:26 PM

@LucasWerkmeister I did not use the back button back then, and I just retried it (without hitting the back button) now, getting "Internal Server Error - The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application." after submission and reload.

That’s weird, because the last error in the server logs is from January 12th (and that one was caused by me).

There are some older errors (also January 12th, around 8AM UTC), all of them for /template/german-noun-feminine/bulk/ and with the message “ValueError: neither n nor n+1 fields”, which means that the user (you?) didn’t specify the right number of pipe-separated fields (that template has 8 forms, so there should be 8 or 9 fields per input line). I’m not sure how well that error is reported at the moment (chances are “not at all”), but from the timing it sounds like that’s not the latest error you encountered?

Mentioned in SAL (#wikimedia-cloud) [2020-01-15T00:18:16Z] <wm-bot> <lucaswerkmeister> deployed bc1d49c202 (better CSRF error handling, T242573)

But anyways, I’ve tried to improve the behavior in case of CSRF error a bit, too.