I've tried this a couple times on a fresh 5.1 with only the contributed modules jQuery_update, Fivestar, and the VotingAPI installed.

The stars are rendered, voting 1 through 5 works. It's only when I go to cancel a vote that instead of updating, the #0 gets appended to the URL and nothing happens (vote remains same). I can also see the URLs in the status bar in FF (#20, #40, etc) when hovering over them, while with jquery 1.0.x, I don't. However, clicking one of the stars doesn't append its anchor to the URL, and works.

CommentFileSizeAuthor
#5 fivestar_update2.patch1.62 KBquicksketch
#2 jqueryprob.gif29.66 KBbsuttis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

I'm unable to reproduce in either the Drupal standard jQuery or the version with jquery_update.module. Do you have a sample URL I could look at or more information about your configuration?

bsuttis’s picture

FileSize
29.66 KB

I've constantly reproduced the same issue locally, fresh install after fresh install. I've yet to try it online though, so I don't have a url to show you. I don't see how it would act any differently?

Attached is the status report of my sandbox, if that's any help at all. If not, I'll try to reproduce the same issue online.

quicksketch’s picture

Rock, thanks bsuttis! I switched to PHP5 and immediately reproduced the problem. I'm looking into it now.

quicksketch’s picture

Er... something. Now it's showing up in PHP4 and 5. So nevermind that. The important thing is it's *not* working. :)

quicksketch’s picture

FileSize
1.62 KB

Attached is a patch which I believe corrects the problem in both versions of jQuery. Not sure why I wasn't able to reproduce, so I apologize for that. I got rid of a few more of the .end() methods which caused most of the problems in the jQuery update, but then also found a problem with the .merge() function in 1.1.2. The newer version was actually doing the "correct" thing, while the old version just ate it and returned an incorrect result.

quicksketch’s picture

Status: Active » Fixed

After testing a bit I've committed the patch. I think this warrants the release of Fivestar 1.7, but I'll wait to see if any new issues crop up over the next few days. You can download the dev version or use the patch above to correct the problem immediately. Thanks!

bsuttis’s picture

Nice! Issue resolved.

One thing I am noticing though, the status bar does show the vote fragment with the url (i.e. node/1/#0), whereas, before (if I'm remembering correctly) it did not. This doesn't seem to have any affect with the function, it's purely aesthetic. Not even an problem really, I just thought I'd mention it.

quicksketch’s picture

Weird... you're right. I think this is more the "correct" behavior. As we clear out more of that funky jQuery I wrote when I first learned it, things start acting more consistently. Thanks for the heads up!

Anonymous’s picture

Status: Fixed » Closed (fixed)