What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

In the last couple of months I observed strange behavior when up- or downvoting on answers on various occasions.

Within one post (containing several answers) my votes seem to switch answers: I upvoted on one answer but after I reload the page the upvote is instead displayed on a different answer (in one occasion even on the question).

I'm seeing this behavior on both Mac OS Safari and iOS Mobile Safari. I'm sure of at least three occasions of the bug (but remember more situations where I am unsure).

The bug might be connected to cases where I voted on an answer that has been edited after I loaded the page, but that's just a guess.

Answering the comments:

It might help the developers to know which posts this applies to.

Agreed. I'll add a links to occasions where the bug happens from now on.

what sort order in the answers are you using?

My sort order is usually by votes, but I think it happened with different settings, too.

Also, does it ever seem votes are not counted at all? (Hence: might have ended up in a different question?

No, I never had a case of a disappearing vote. Votes just switch answers (or even to the question).

might it indeed only happen AFTER you loaded new answers

No I don't think its connected to new answers. But I'm not totally sure about this.

any ad blocker active?

I'm using AdBlock 2.5.56 on Desktop Safari. I'd use it on Mobile Safari if Apple would allow extensions, yet they don't :(

Ah, you already wrote: all the time...

To me it happens maybe around 5–10% of the times I vote.

I assume you see the vote-arrow that you clicked change its color to orange?

Yes, definitely.

And I assume you're actually clicking the arrow, not using some keyboard navigation?

Right. (Tapping, on Mobile Safari, though).

if it happens again, please try to remember if you already voted something else on the same page before doing the Ajax magic

I happened to me on the first vote in this post. I'm not sure if it's connected to AJAX. I had the problem with simple reloads, as well.

Quite interesting that you're seeing it quite often, while I cannot reproduce it.

It's not that often. Sometimes I don't see if for a week or two.

Also quite scary, when building web sites...

Yes. It does give me a bad feeling using SO as well. In some occasions I voted on one of two answers (of which one was good and the other very bad). Then I come back later and find that my upvote is locked in on the bad answer.

Bug occurrences:

  • 2013-05-10 14:30 UTC+2: Downvote clicked: http://stackoverflow.com/a/16482224, after reload triangles appear grey, orange downvote triangle instead on http://stackoverflow.com/a/16481962

  • Antony wrote in the bounty message on May 5th, 11:12: Just recently, I edited and upvoted this answer which was at the bottom at that time, then come back 25 minutes later to see another answer was upvoted.

  • Antony commented April 13th, 5:37: I tried to downvote a wrong answer in this question, but after that answer was removed, I found myself downvoted the question instead.

  • Antony commented April 8th, 18:36: I tried to upvote the answer of this question, went to see the possible duplicate and went back using the back button. What I saw was that the answer score was linked to the question score, and the page showed that I have upvoted the question instead of the answer. I didn't consider the back button before. Maybe that also has something to do with this bug? And the answer I tried to upvote was loaded with AJAX.

  • 2013-08-29 15:10 UTC+2: Downvoted http://stackoverflow.com/a/18510527/104790, after going back a while later (using the browser's back button, pointing to an older comment of me on the same page) I noticed the orange downvote triangle on http://stackoverflow.com/a/18510507/104790. Reloading fixed the orange marker, then pointing to the answer I really downvoted on.

  • 2013-09-02 17:30 UTC+2: Downvoted on http://stackoverflow.com/a/18566858/104790. Coming back after a while the downvote appears on http://stackoverflow.com/a/18567311/104790. Cannot change the vote since it's locked in. Interestingly the comment I added appeared on the correct answer.

share|improve this question
2  
Happens to me all the time, usually after new answers are loaded with AJAX. –  Antony Apr 5 '13 at 19:04
    
It might help the developers to know which posts this applies to, so they might be able to browse some logs? Also, does it ever seem votes are not counted at all? (Hence: might have ended up in a different question? Votes are sent by post id, so answers are unrelated to questions, as for voting.) –  Arjan Apr 6 '13 at 7:33
    
Nikolai & @Antony, what sort order in the answers are you using? And Nikolai, might it indeed only happen AFTER you loaded new answers? –  Arjan Apr 6 '13 at 7:36
1  
@Arjan I sort them by the number of votes (default). When a new answer comes in, it would appear at the top (regardless of the sorting). If I find it good and upvote it, then come back later to the question, I would see a different answer is upvoted. I have to unupvote that answer and vote on the one I initially intended to upvote. –  Antony Apr 6 '13 at 17:37
    
In the HTML, each voting area has a hidden input, <div class="vote"><input type="hidden" value="15853814">, where 15853814 is the post number. While voting, that number is fetched using return a.closest("div.vote").find("input").val(). For me, in Chrome and Safari on a Mac, that works nicely, also after clicking "1 new answer to this question". What browser are you using, @Antony? –  Arjan Apr 6 '13 at 18:35
    
@Arjan Safari 6.0.2 on Mac –  Antony Apr 6 '13 at 18:38
    
I'm on Safari 6.0.3 (on OS X 10.8.3) but I doubt that matters, @Antony. Do you feel it always is wrong when voting on dynamically loaded answers? I've tested a bit, sorted by votes, both with the dynamically loaded post being the first answer, or the second answer. All fine. I guess it's irrelevant, but: any ad blocker active? –  Arjan Apr 6 '13 at 18:59
    
(Ah, you already wrote: all the time...) –  Arjan Apr 6 '13 at 19:00
    
@Arjan No ad blockers. If it happens again, I will report here. –  Antony Apr 6 '13 at 19:01
    
Meanwhile I also tried in Safari by first upvoting an existing answer, and only then loading the "1 new answer to this question", and then (down)voting that. Same result; no problems for my tests. I still somehow expect that some sort of caching combined with the a.closest("div.vote") is the culprit... @Antony and Nikolai: before you reload the page, I assume you see the vote-arrow that you clicked change its color to orange? (And I assume you're actually clicking the arrow, not using some keyboard navigation?) –  Arjan Apr 7 '13 at 13:56
1  
@Arjan I did click the arrow and it did change color. Sometimes the orange arrow would appear on a different answer after further AJAX load. A simple refresh would solve the problem. Sometimes the orange arrow would remain on the original answer, but after I leave and return to the question, it would appear on a different answer than the one I intended to upvote. Sometimes the arrow and the score would be linked to the question score (they move up and down simultaneously). Again a simple refresh would eliminate this weird behavior. –  Antony Apr 7 '13 at 14:44
    
@Antony, if it happens again, please try to remember if you already voted something else on the same page before doing the Ajax magic? (Quite interesting that you're seeing it quite often, while I cannot reproduce it. Also quite scary, when building web sites...) –  Arjan Apr 7 '13 at 14:55
1  
Maybe not so odd, @Antony. Indeed, in Chrome the Back button always (as far as I know) shows me the old state. Like: with the votes known after the page was first loaded, and without any changes that were loaded by clicking some "1 new answer to this question". In other words: when using Back any recent Ajax updates are just lost. Fine. However: not so much for Safari, which seems to reload the page when using the Back button. (My Safari has no extensions, and its Develop menu does NOT have "Disable Caches" activated.) Just different design, I'd say. (I mainly use Chrome.) –  Arjan Apr 8 '13 at 19:21
2  
Hmm... we really need a "Voting Sandbox" here on Meta (like the formatting sandbox we already have) where voting is totally free and not counted towards the daily limit. Having this reproducing this problem should become much easier. :) –  Shadow Wizard May 5 '13 at 13:07
1  
Just curious (I cannot help) but: still seeing this? (How did I manage to “lock in a vote” on my answer from before it was posted? may be the funniest example, if related.) –  Arjan Aug 27 '13 at 19:04

You must log in to answer this question.

Browse other questions tagged .