How to replicate this:
Post a comment without any stars
Edit the comment and highlight it with 1 star
Click Save -> presents 5 stars

The problem is on the line 184 in fivestar_comment.module
db_query('INSERT INTO {fivestar_comment} (cid, value) VALUES (%d, %d)', $cid, $vote['user']['vote_id'], $value);
should be:
db_query('INSERT INTO {fivestar_comment} (cid, vote_id, value) VALUES (%d, %d, %d)', $cid, $vote['user']['vote_id'], $value);

patch attached

CommentFileSizeAuthor
fivestar-comments.patch854 bytessign
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Needs review » Fixed

Committed to both 5 and 6 versions. Thanks!

Status: Fixed » Closed (fixed)

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

amorsent’s picture

Status: Closed (fixed) » Active

This bug still exists over a year later in the most recent 6.x-1.19 release (2009-Oct-22)

A diff of 6.x-1.x-dev and 6.x-1.19 reveals that this is one of the only a few changes.

How 'bout a 6.x-1.20 release addressing this bug? The longer this bug exists, the more comments are getting registered with vote_id = 0 and I'm not sure there's a way to rebuild that data.

Maybe we could slip in the comment <-> vote views relationship into a release as well?:
http://drupal.org/node/859808#comment-3518436

The issues are somewhat related because the view relationship does no good if the vote_ids are all 0.

amorsent’s picture

Version: 6.x-1.15 » 6.x-1.19

Updating the version to 6.x-1.19

vkareh’s picture

Status: Active » Closed (fixed)

This issue was addressed, but I think there were some changes in Voting API later on. The new problem is being taken care of here: #601160: Comment-cast ratings not deleted with comment.