Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.6k views
in Q2A Core by
edited by

I was once reporting on this issue here: Best Answer selected two times / select → unselect → select

Again and again I see this "double event" occuring, so I consider, this must a bug.

As I am writing in this post, it might be an Ajax related bug... especially because 6 events from one user happen in 1 second°!

Especially, as I disabled best answer voting using Jquery. So after chosing best answer, the button gets disabled and hidden. Even when the user visits his question again, he cannot click on best answer anymore (hidden by JS).

--

Note: Couple of months ago I realized that users can still select another answer as best, which unselected the previous selected answer. I removed this as well but still the same double event.

--

Here is an example of events in the same second that you might find in your eventlog table as well:

userX in_a_select parentid=18551    parent=array(66)    postid=18553    answe...
NULL a_select parentid=18551    parent=array(66)    postid=18553    answe...
userX in_a_unselect parentid=18551    parent=array(66)    postid=18553    answe...
NULL a_unselect parentid=18551    parent=array(66)    postid=18553    answe...
userX in_a_select parentid=18551    parent=array(65)    postid=18553    answe...
NULL a_select parentid=18551    parent=array(65)    postid=18553    answe...

 

Anonymous NULL asked. userX gave the answer.

Any idea how to solve this bug?

--

Adding 2 screenshots from today, 2013-06-06, bug:

bug

bug

Q2A version: 1.5.4
by
error_log is empty. I see 2 POST request above (n° 1 and 3), why do you state "there's only one"?

I checked my javascript in qa-question.js / function qa_answer_click() with the default one. I have only added code to hide the best-answer-select-button and disable it. So this should not be the problem.

PS: The error does not happen every day, just once or twice a week. But why? ... :(
by
Only "POST /" is the Ajax request - "POST /30549/exponential-und-logarithmusfunktion" is a non-Ajax submission.
by
As I see now, the "double event bug" also happens for the upvote event sometimes!

e.g.
2013-07-20 08:41:10    in_q_vote_up    postid=874    vote=1    oldvote=1
2013-07-20 08:41:10    q_vote_up    postid=874    vote=1    oldvote=1
2013-07-20 08:41:09    in_q_vote_up    postid=874    vote=1    oldvote=0
2013-07-20 08:41:09    q_vote_up    postid=874    vote=1    oldvote=0

What is the oldvote parameter by the way?
by

Please log in or register to answer this question.

...