Closed larouxn closed 9 years ago
Could be people clicking the submit button multiple times?
On Tue, Jan 13, 2015 at 1:42 PM, Nicholas La Roux notifications@github.com wrote:
I am not sure whether this is specific to my setup or not but every time someone comments on a post the comment is posted many times. Sometimes the comment just posts twice. Sometimes upwards of seven duplicate comments are posted.
I'm watching my logs when I click post comment and it doesn't show any errors or anything. The comment action simply happens multiple (random number) of times.
Any ideas?
— Reply to this email directly or view it on GitHub https://github.com/bborn/communityengine/issues/281.
Currently my site is still in development so I'm doing the commenting myself, testing stuff. I am clicking 'Add Comment' button a single time and getting random number of duplicate comments every time. Just tested it again. Clicked it once. Received ten duplicate comments on the post.
Really strange behavior. I don't know why the number of duplicates varies either.
I had similar issues thought that might be caused by clicking twice. so had a PR back then https://github.com/bborn/communityengine/pull/223
then I figured this could also happen if the community_engine.js is included multiple times via layout, asset pipeline, and/or precompile configuration..then it triggers the ajax call multiple times.
On Tue, Jan 13, 2015 at 12:47 PM, Nicholas La Roux <notifications@github.com
wrote:
Currently my site is still in development so I'm doing the commenting myself, testing stuff. I am clicking 'Add Comment' button a single time and getting random number of duplicate comments every time. Just tested it again. Clicked it once. Received ten duplicate comments on the post.
— Reply to this email directly or view it on GitHub https://github.com/bborn/communityengine/issues/281#issuecomment-69806885 .
Hmmm... why would you be including community_engine.js multiple times? Anyway, we should check that js call and make sure it can't fire again until a response is received.
Hey guys, any luck making sure the JS call waits for a response before firing again?
I'm working some of these Rail4 Turbolinks-related issues out in the new edge branch (https://github.com/bborn/communityengine/tree/edge). Feel free to check that out (note that there are plenty of breaking changes in there, so I wouldn't recommend putting your app on it unless you're starting from scratch).
I am not sure whether this is specific to my setup or not but every time someone comments on a post the comment is posted many times. Sometimes the comment just posts twice. Sometimes upwards of seven duplicate comments are posted.
I'm watching my logs when I click post comment and it doesn't show any errors or anything. The comment action simply happens multiple (random number) of times.
Any ideas?