I've spent half a day following and re-following these instructions http://drupal.org/node/1308114 to the letter (apart from using the word "Category" instead of "Rating" for my tag), and they just don't work.
I can rate comments, both for anonymous and logged-in users, and the rating then shows in the comments no problem.
The parent node however, just doesn't update and in the absence of any errors, I really don't know where to start to troubleshoot this.
Using the latest dev release, on the latest Drupal 7.15 with all updates applied.
I've got a content type "Category Ratings" with a single field "cat_rating" which is a fivestar rating field, set as read-only in the display options, and pointing to the "Category" tag.
In that content type's comments fields, I've set up exactly the same field, with the same settings, apart from having set a target field of "parent" and set the comment display to show user rating instead of average.
Anyone got any clue how I can start to debug this? As the comments rating works absolutely fine, I'm guessing either the rating field in the parent node isn't working, or there's some issue with pointing at the parent... help much appreciated.
Louis
Comment | File | Size | Author |
---|---|---|---|
#36 | votingapi.jpg | 218.49 KB | Samaella |
#36 | permissions.jpg | 133.76 KB | Samaella |
#36 | Comments_10-16.jpg | 205.71 KB | Samaella |
#36 | Comments_5-9.jpg | 336.92 KB | Samaella |
#36 | Comments_1-4.jpg | 210.29 KB | Samaella |
Comments
Comment #1
louis_sabet CreditAttribution: louis_sabet commentedAttached are some screenshots showing the various settings being used. Hopefully that makes it nice and obvious whether this is a bug, or me misunderstanding something.
Thanks
Louis
Comment #2
louis_sabet CreditAttribution: louis_sabet commentedNobody else with the same issues? At least a 'Me too' would make me feel better!
Comment #3
Fred8 CreditAttribution: Fred8 commentedYes, I can make you feel better, it does not work for me too.. Last vote replaces the existing vote (only one vote remains).
Have you had any luck with your project so far?
EDIT: I thought it could be something to do with IP-s (to ensure the same IP doesn't vote multiple times). But no, using a different IP still gives the same result.
EDIT 2: It seems I solved the issue.
All you have to do, is you should go to admin/config/search/votingapi and change Vote tallying to Do not tally results automatically: I am using a module that manages its own vote results. Now it works. However, in order to add votes you still have to change the IP, and also delete cookies. With old cookie or from the same IP it only changes your vote.
Comment #4
gbrennae CreditAttribution: gbrennae commentedI also have the same issue and have been pulling my hair out for days now...
I've tried both using the comments -> Parent Node method and the Node Reference (a Review content type referencing a Product Content type) methods and neither will have any affect on the main nodes (product) overall rating. The main node rating just has a value of zero.
I've followed the instructions to the word over and over and still the same result.
Please help!
Comment #5
rootical CreditAttribution: rootical commentedGot strictly the same! It worked for more then a year like this but then of a sudden stopped! Maybe it was core update or voting api update... Please someone.
Comment #6
loze CreditAttribution: loze commentedme too.
Comment #7
loze CreditAttribution: loze commentedIve found this happens when I reuse fields across node types.
it appears to work correctly if i only use the field in one node type.
strange.
Comment #8
rootical CreditAttribution: rootical commentedBut it did work correctly ( Why stopped? Maintainers, please, help the people or just piont out where to dig?
I've also noticed that it works correctly when no comment approval is needed (or you have permissions to post comments without approval) otherwise it takes the last votes.
Dear 5star developers, please mind that this problem i had wrote before didn't come back.
Comment #9
ericduran CreditAttribution: ericduran commentedHmm, I find this a bit strage. I haven't made a commit to Fivestar in over a year how did it brake?
Did you recently update a module? I'll have a look to see if maybe something in votingapi change.
Comment #10
rootical CreditAttribution: rootical commentedYeah, i mentioned in similar issue that it had been core updates or voting api updates.. Thanks
Comment #11
k.dani CreditAttribution: k.dani commentedSame problem here...really annoying....
Comment #12
timodwhit CreditAttribution: timodwhit commented+1 Same issue
Comment #13
chrisolof CreditAttribution: chrisolof commentedSame issue here - after some troubleshooting I believe I've got a fix (attached patch) for 7.x-2.x-dev.
Comment #14
chrisolof CreditAttribution: chrisolof commentedUpdating status to needs review.
Comment #15
zilla CreditAttribution: zilla commentedhas that patch been tested by others?
is #3 above a more logical approach or the wrong approach? if set to "don't tally, i am using a module that manages its own results" - won't that actually screw up five star's calculations or will it remedy this issue? i don't really understand what that setting is for - or more specifically, how to determine if five star is a module which will manage its own results effectively and correctly if this setting is selected in voting api
Comment #16
chrisolof CreditAttribution: chrisolof commentedNew patch - old one was preventing anonymous users from seeing star ratings in some cases.
I'd strongly suggest this patch be reviewed & tested by others. I'm not a fivestar expert so let me know if there's a better way to fix this. None of the settings adjustment ideas posed on this and other threads produced results for me.
Comment #17
Nikita Petrov CreditAttribution: Nikita Petrov commentedchrisolof, thank you very much! I have this issue, and your patch works fine for me!
I don't know is it the best approach or not, but it actually works, so i set the status of this issue to "Reviewed and tested".
Comment #18
MD3 CreditAttribution: MD3 commentedI did not apply the patch, but very carefully followed the Fivestar 7.x: Creating a User Comment/Rating and Average Rating for a Content type manual page. I found that I had several things wrong from the Setting Up the Content Type (node) checklist:
Comment #19
rootical CreditAttribution: rootical commentedThe patch really solves the issue! Thanks a lot, mr chrisolof !
Was facing this problem for more then a year!
I would even say - shame on fivestar developers.
Comment #20
zilla CreditAttribution: zilla commentedany idea when this will be RTBC and committed?
Comment #21
pinkonomy CreditAttribution: pinkonomy commentedThe patch from #16 makes the rating visible on parent node ,but it only records the last voted comment ,not the average.So this is not working correctly.
It needs to calculate the average of rated comments,not only the last comment.
Opening again this issue
Comment #22
pinkonomy CreditAttribution: pinkonomy commentedComment #23
Anonymous (not verified) CreditAttribution: Anonymous commentedJust a quick thank you to @chrisolof. #16 Patch works great! Note that you may need to follow instructions in #3 from @Fred8.
I decided to set my voting to immediate as all my comments are entered by authenticated users and I don't mind allowing them to enter a rating more than once on a given node.
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous commentedOne more issue. I want the node author to be able to vote/rate the content as well as the people who are commenting. This does not seem to be working.
Thoughts?
Comment #25
whiteph CreditAttribution: whiteph commentedI'd be happy to try to get to the bottom of this, but I'm going to need some help. Here are my thoughts so far.
I think there are three different issues being mixed up here:
x. The original issue opened by @louis_sabet, which is having followed instructions documented in http://drupal.org/node/1308114 comments are being updated properly but "The parent node however, just doesn't update".
y. The issue raised by @Fred8 in #3, "Last vote replaces the existing vote (only one vote remains)."
z. The issue raised by @trainingcity in #24, "One more issue. I want the node author to be able to vote/rate the content as well as the people who are commenting. This does not seem to be working."
I started by creating a brand new install, Drupal 7.24, Voting API 7.x-2.11, and Fivestar 7.x-2.x-dev. I followed the instructions in node/1308114, created a new Review (my new content node) then added a comment with a five star rating. The rating appeared ok on the comment and on the review. I added a second comment with a different rating, and although the comment was fine, the Review didn't have the average - it had simply copied the latest comment's five stars to the parent Review. That seems to be my issue y) above.
I logged out, and logged in again as a different authenticated user, then created a new comment with its own five star rating. This time the parent Review did have an average - that of the last comment I entered as the original user, and the one just entered as the new user. So I dug into the Voting API code and database structure. It by design only uses the last-entered rating by a user, to prevent spamming. A user is defined as an authenticated user, or the IP address of an anonymous user. I'm hoping that this explains my issue y).
Note that there are two options (one for authenticated users, one for anonymous users) in admin/config/votingapi which allow you to set the minimum time allowed before a user can vote again. These settings might be useful when you're testing.
I can't reproduce my issue x), which is the original issue opened by @louis_sabet. If you are still having the issue where nothing, or zero, gets posted in the parent node, please add a new comment to this issue explaining how your install differs in any way from the instructions in node/1308114 - particularly if your site is more complicated e.g. reuse of tags. Ditto if @chrisolof's patch solved your problem.
Please create a brand new issue in the Fivestar issue list for my issue z), @trainingcity's in #24 - that looks to be very different from the original.
Also mentioned above:
a. @Fred8 in #3, "in order to add votes you still have to change the IP". See my explanation re how users are defined in Voting API. IP addresses are used for anonymous users.
b. @Fred8 in #3, "change Vote tallying to Do not tally results automatically: I am using a module that manages its own vote results." Fivestar uses automatic vote tallying. I've grep'd the Fivestar code base for the Voting API function name which allows its clients to have control over vote tallying - it's not there.
c. @rootical in #5, "It worked for more then a year like this but then of a sudden stopped! That might be an important clue - can you remember when it stopped working? How is your site config different from node/1308114?
d. @loze in #7, "Ive found this happens when I reuse fields across node types. it appears to work correctly if i only use the field in one node type." This might be an important clue - but how does your site differ from the simplistic node/1308114?
e. @rootical in #8, "I've also noticed that it works correctly when no comment approval is needed (or you have permissions to post comments without approval) otherwise it takes the last votes." Is it really this, or could it be the user be stopped from spamming by design?
f. @chrisolof in #13, "I believe I've got a fix". Updated in #16.@Madaro in #17 says that fixed his problem. @rootical too in #19. But @pinkonomy in #21says "The patch from #16 makes the rating visible on parent node, but it only records the last voted comment ,not the average. So this is not working correctly." @trainingcity in #23 says the patch works great. I'd really like to know how the sites which have been fixed differ from the simplistic case in node/130114, so that we can track down the bug before committing the patch.
g. @MD3 in #18 says (I'm interpreting this) that when he checked his site against the instructions, he noticed a couple of errors. It's really important to set the parent/comment/tag correctly as per node/1308114.
h. @trainingcity in #23 says "I decided to set my voting to immediate". I think this is referring to the Voting API config setting controlling how quickly users can vote again.
Comment #26
rootical CreditAttribution: rootical commentedAverage rating still doesn't work! I had been wistaken in #19. Nor the newest stable or dev version nor the patch was mentioned! And it's really-really bad.(
Comment #27
Andrew Jamieson CreditAttribution: Andrew Jamieson commentedYup, Still not working for me either.
Comment #28
whiteph CreditAttribution: whiteph commentedAs I said in #25, there are several issues being mixed up here. #26 and #27 aren't very helpful - they just say "something is wrong, and it's really, really bad". How am I supposed to debug that?
It would be helpful if you could re-test against the 7.x-2.0-beta1 release.
Comment #29
whiteph CreditAttribution: whiteph commentedThis thread has got several issues mixed up. I suspect most of these are cleared up in the latest release. Please open a new bug report if any of these are still outstanding.
Comment #30
Andrew Jamieson CreditAttribution: Andrew Jamieson commentedVoting average is still not working for me. I have the latest dev versions of both Voting API and Five star modules. It seems to hit 3 votes and then the vote count does not change. If I vote again however, the average changes but the number of votes stays at 3 (even though the comment is still awaiting approval) If I then approve the comment nothing changes further. I have set both voting rollovers to immediate and tried all options for tallying the votes.
Comment #31
AaronBaumanOpened a new issue: #2308563: Average rating doesn't work (again)
Comment #32
danymill CreditAttribution: danymill commentedSame problem. Still doesn't work :(
Comment #33
altavis CreditAttribution: altavis commentedThe whole setup described here: https://www.drupal.org/node/1308114 works just fine with Fivestar 7.x-2.x-dev from 2014-Mar-24 and Voting API 7.x-2.12.
Comment #35
Samaella CreditAttribution: Samaella commentedfivestar-7.x-2.1
votingapi-7.x-2.12
the audience of my website - only anonymous users
Сreated «a User Comment/Rating and Average Rating for a Content type» by this instruction.
permissions
admin/people/permissions
Fivestar (rate content)
ANONYMOUS USER – OK
AUTHENTICATED USER – OK
votingapi
admin/config/search/votingapi
Anonymous vote rollover : Immediately
Registered user vote rollover : Immediately
Result
Anonymous vote:
Last vote replaces the existing vote (only one vote remains).
Registered user vote:
OK - Average Vote
Comment #36
Samaella CreditAttribution: Samaella commentedmore
Comment #37
vbard CreditAttribution: vbard commented#18 helped me!
I selected Widget type: Stars (rated while viewing) on parent node and it became to show it's comments votes.
Comment #38
Chris Park CreditAttribution: Chris Park commentedI have the same issue as Samaella. Only the latest vote by anonymous users shows up. This does not happen if anonymous users have skip comment approval permission. Any progress on this?
Comment #40
dbt102 CreditAttribution: dbt102 commentedvotingapi is now at --> 7.x-2.12
five star is now at --> 7.x-2.2
***** If you are updating from a version earlier than "fivestar 7.x-2.0-rc1", to that version or any later version (including both "fivestar 7.x-2.1" and "fivestar 7.x-2.x-dev") you MUST run the database update update script, ensuring that 7206, 7207, and 7208 are run *****
so closing out this issue ...
also ... based on #28 comment above ... seems like there were multiple issues getting confused.
Comment #42
mlumadue CreditAttribution: mlumadue commentedI am experiencing the exact same issue described by #35 / 36, but with Voting API 7.x-2.12 and Fivestar 7.x-2.2: reviewed anonymous comments do not update the average (and change the vote count when switching the same thread between reviewed and not reviewed). Works fine with non-reviewed anonymous comments and with logged in users (reviewed and not-reviewed). Maybe related to a 2-yo issue with Voting API, as reported here: https://www.drupal.org/node/2613246.
So basically, this is still a little broken.
Comment #43
lubwn CreditAttribution: lubwn commentedExperiencing the very same problem as others. Average function works properly only when votes are sent by non-anonymous users or when not going through approval process. So yes it is still broken.
Comment #44
lubwn CreditAttribution: lubwn commentedI actually solved this issue by this thread:
https://www.drupal.org/project/fivestar/issues/2498161#comment-12648866
Where patch in #10 works perfectly for me. Leaving it here as it might help someone in the very same situation.