Im using fivestar and voting api to allow anonymous users the ability to leave a rating on a comment for a node. But for some reason when i approve the new comment it overwrites the pervious anonymous users rating in votingapi_vote table but keeps the previous IP even it its from a completely different IP. I have the rollover setting for anonymous users set to 5 minutes.

Steps I took:

1) Create a fivestar rating field in the custom Content Type called rating
2) Add a fivestar rating field in comments using a previous field(one created above)
3) Go into display options and set its target to parent node
4) leave a comment on a node with that content type with a rating
5) Start up VPN and leave another comment on the same node and it will overwrite the previous comments value but not update the IP

Comments

GreatSpoon created an issue. See original summary.

swashbuck’s picture

I can reproduce this, too. The votingapi_cache table numbers are incorrect (and probably votingapi_vote also). In my case, I have 4 comments with fivestar ratings showing on the page (most anonymous with different hostname IPs showing in the comment table, one is a registered user). The 'function: count' row shows 2 and the 'function: average' row is 100 (clearly incorrect, as the comment ratings are 1 (x2), 3, and 5 stars). The field_data_field_rating table (the ratings field on my node) seems accurate.

I tried clearing the cache. Vote tallying for the config is set to "Tally results whenever a vote is cast." Both rollovers are set to 5 minutes, and all the comments were made past that time period.

There are a few issues about this in the fivestar issues queue, but I think the issue lies with the VotingAPI module.

Jeroen94’s picture

Status: Active » Needs work

I have the same problem when using the Fivestar module. The votingapi_cache and votingapi_vote tables are correct when anonymous users may skip the comment approval, but only the last vote is stored when the comments are (manually) approved afterwards. The problem therefore lies with the Voting API module and not with Fivestar.

cosolom’s picture

This is not Voting API bug. Try look here this patch here (comment #10)