Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | fivestar_update2.patch | 1.62 KB | quicksketch |
#2 | jqueryprob.gif | 29.66 KB | bsuttis |
Comments
Comment #1
quicksketchI'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?
Comment #2
bsuttis CreditAttribution: bsuttis commentedI'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.
Comment #3
quicksketchRock, thanks bsuttis! I switched to PHP5 and immediately reproduced the problem. I'm looking into it now.
Comment #4
quicksketchEr... something. Now it's showing up in PHP4 and 5. So nevermind that. The important thing is it's *not* working. :)
Comment #5
quicksketchAttached 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.
Comment #6
quicksketchAfter 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!
Comment #7
bsuttis CreditAttribution: bsuttis commentedNice! 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.
Comment #8
quicksketchWeird... 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!
Comment #9
(not verified) CreditAttribution: commented