If I unpublish or delete a comment, the vote associated to it won't be deleted.

Similarly, if a user votes a node using a comment, and the comments are moderated, their vote will be registered anyway.

Only published nodes should be valid for voting computation.

Comments

Mac Clemmens’s picture

Same issue here.

It shows rating based on # votes but if a comment/vote is deleted from a node (i.e. deleting test user comments/ratings, or those deleting because of abuse.) It still counts the deleted votes... I deleted a user's comment, it still says the rating is based on 2 votes even though there is only one comment/rating published.

jerry’s picture

Subscribing.

Albert.Liu’s picture

Subscribing.

halloffame’s picture

Having similar issue with votes on unpublished comments are still being counted. Posted on Fivestar issue drupal.org/node/358614. Solution on comment #2 does not seem to work for me.

Anonymous’s picture

You need to manually truncate the `votingapi_cache`, as it's not currently emptied by flush-all-caches.

petu’s picture

Version: 6.x-2.3 » 7.x-2.12
Issue summary: View changes

I have the same issue with 7.x version.
Also, if unpublish and publish a comment several times, the total score and vote results are increased each time the comment is published.

If you use fivestar module the solution is here: https://www.drupal.org/node/2119553. I.e. set Registered user vote rollover option to any but Immediately.