-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow duplicate comments posted around the same time #1209
Comments
It's not a recent problem. I put together a query to find duplicated comments. This has flown under the radar because most (594 of 806) are removed by the submitter or a mod. I haven't investigated the code, but I remember there's a bit in CommentsController that tries to prevent duplicate comments; it's clearly not working. A complexity I remember is that we try to post comments by ajax to avoid provide a nicer-looking experience without the full-page reload (which would also move the user's ReadRibbon, resetting 'unread' markers). Maybe browsers are not waiting on the js to resolve? Or getting a js error after the server's received the comment, so they're submitting the comment anyways? Plenty to investigate.
|
Anecdotally, I've noticed an uptick recently in duplicate comments being posted in stories. For example: https://lobste.rs/s/bkw5u0/no_stale_bots#c_7jfizv and https://lobste.rs/s/bkw5u0/no_stale_bots#c_woz48w, and there was another pair on a recent story too (I'm not sure which one).
Seems likely this is a comment POST being received and processed by the server, but not making it back to the client or something like that. Ideally the server could catch this case and either abort the comment post or ideally simply lie to the client that the comment had been posted, claiming that the already-posted comment was actually the just-submitted comment. (Assuming the server even returns e.g. the comment URL - I haven't actually checked.)
It's unclear to me whether this is a recent problem or whether I just happen to have noticed it recently.
The text was updated successfully, but these errors were encountered: