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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

louis_sabet’s picture

Attached 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

louis_sabet’s picture

Nobody else with the same issues? At least a 'Me too' would make me feel better!

Fred8’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha2

Yes, 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.

gbrennae’s picture

I 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!

rootical’s picture

Got 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.

loze’s picture

me too.

loze’s picture

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.
strange.

rootical’s picture

But 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.

ericduran’s picture

Hmm, 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.

rootical’s picture

Yeah, i mentioned in similar issue that it had been core updates or voting api updates.. Thanks

k.dani’s picture

Same problem here...really annoying....

timodwhit’s picture

+1 Same issue

chrisolof’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Issue summary: View changes
FileSize
1.8 KB

Same issue here - after some troubleshooting I believe I've got a fix (attached patch) for 7.x-2.x-dev.

chrisolof’s picture

Status: Active » Needs review

Updating status to needs review.

zilla’s picture

has 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

chrisolof’s picture

New 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.

Nikita Petrov’s picture

Status: Needs review » Reviewed & tested by the community

chrisolof, 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".

MD3’s picture

I 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:

  • Step 5. Select Widget type: Stars (rated while viewing).
  • Step 14. Uncheck "Expose this Fivestar field for voting" (Disables this field from actually being rated on as it will contain only the average of all of the users submissions).
rootical’s picture

The 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.

zilla’s picture

any idea when this will be RTBC and committed?

pinkonomy’s picture

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.
It needs to calculate the average of rated comments,not only the last comment.
Opening again this issue

pinkonomy’s picture

Status: Reviewed & tested by the community » Needs work
Anonymous’s picture

Just 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.

Anonymous’s picture

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.

Thoughts?

whiteph’s picture

I'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.

rootical’s picture

Average 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.(

Andrew Jamieson’s picture

Yup, Still not working for me either.

whiteph’s picture

As 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.

whiteph’s picture

Status: Needs work » Closed (won't fix)

This 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.

Andrew Jamieson’s picture

Voting 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.

AaronBauman’s picture

danymill’s picture

Version: 7.x-2.x-dev » 7.x-2.1
Assigned: Unassigned » danymill
Status: Closed (won't fix) » Active

Same problem. Still doesn't work :(

altavis’s picture

Assigned: danymill » Unassigned
Status: Active » Fixed

The 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Samaella’s picture

Priority: Major » Critical
Status: Closed (fixed) » Active
FileSize
135.86 KB

fivestar-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

Samaella’s picture

vbard’s picture

#18 helped me!
I selected Widget type: Stars (rated while viewing) on parent node and it became to show it's comments votes.

Chris Park’s picture

I 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?

dbt102 credited dbt102.

dbt102’s picture

Status: Active » Fixed

votingapi 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mlumadue’s picture

I 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.

lubwn’s picture

Experiencing 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.

lubwn’s picture

I 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.