I have some problems with submissions of votes.

In the full node body it works ok with IE

In the comment section rating sticks but when posting the comment the vote is not submitted.

In Opera and Firefox I am not able to submit a vote in body node or comment section.

Here's my site: http://imreviews.net maybe that helps.

Thanks very much for this cool module :-)

Comments

jonnyp’s picture

Title: Submitting vote bug » Vote not recorded when comments are submitted
Priority: Normal » Critical

Hi,

I have the same issue - clicking the stars on a full node display will submit the vote correctly via AJAX, however when using the option to add a fivestar field to comments no vote is recorded when the comment is submitted.

Changed the title as I've been watching this issue and can never find it :)

Cheers,
Jonny

dldege’s picture

Same issue for me with. As I a test I made the rating on the comment required and when I submit a comment, with a rating set I get a rating field required validation error so its definitely not submitting the rating that way. Also firebug of the AJAX activity shows that the AJAX vote is not being sent in comment edit form.

http://example.com/comment/edit/1#undefined

is the url being used.

captcha’s picture

Same here. In fact, on posting a rating with a comment, the total vote/rating for the post disappears or is emptied/reset.

Tested using Firefox 2 only.

jereme.guenther’s picture

I am using the 1.11-beta2 and having an issue where none of the votes are being saved.

I am using it as a custom field in a custom content type. It displays fine, but it won't save the values whether the voting option is set to stars or radio buttons. Very odd, I am going to have to dig into it more, it's a great control, aside from the not saving bit.

jereme.guenther’s picture

Well I finally went out and read the documenation like I should have in the first place. I discovered that I wasn't filling in the all critical Target Node ID field.

I went to the example page listed in the documentation and copied the code directly into the field (I named my field the same as the one in the example so I didn't need to change anything).

However, it still doesn't save the values. I had it dump out the three arg fields on node creation and found this:
arg(0) = node
arg(1) = add
arg(2) = testimonial
arg(3) =

my issue is that the code is expecting arg(3) to be numeric, which it isn't, instead it isn't set at all. Any ideas? I am still digging...

jereme.guenther’s picture

Ok, so far I have figured out that the example code appears to be out of date. The field being used appears to be:
$node->field_rating[0]['rating']['vote_value']
rather than the examples:
field_rating[0]['target']

So I am able to pull the saved value from that field, but it is always 1 (the default). It looks like the field value isn't being saved by CCK at all.

jereme.guenther’s picture

well, after spending some more time looking at the code, I don't think the documentation is out of date; the value simply isn't saving so the Node ID field seems to be kind of useless at the moment.

I have even tried going into the fivestare_field.inc file in the "update"/"insert" portion of the case statement and tried hardcoding:
$items[$delta]['target']=4;
at the inside end of the foreach loop. But no difference, either I still don't know what I am doing, or this method never gets called on save, or both.

jereme.guenther’s picture

well I tried rolling back to version 1.10 and the saving and displaying started working correctly. However it doesn't show stars, instead it always shows options boxes; not the biggest issue in the world.

I did discover that when I was manually setting the values in the fivestar_field( function that they were getting saved; however they were still not being displayed.

So the two issues I see in version 1.11 beta2 are:
1. values are not automatically saving.
2. values stored in the database are not being displayed back on the screen.

Kind of sucks, but I am going to have to stay with version 1.10 because I just can't figure out what the issue is.

quicksketch’s picture

Status: Active » Fixed

I think both of these problems have been fixed in the latest 5.x (jereme.guenther you're reporting on a completely different issue I believe). Please reopen the issue if still experiencing it in the latest CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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