Closed (fixed)
Project:
Fivestar
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2011 at 01:50 UTC
Updated:
5 Dec 2011 at 09:40 UTC
Jump to comment: Most recent file
I have nodes where comments are allowed, users put rating in the comments, and then the averages is display in the node - typical stuff.
I created a views list of these results, using the table format, and I wanted to be able to sort by average rating.
The list shows correctly and the table cell title is clickable for 'asc' and 'desc.' However, when you click it, nothing happens - doesn't change.
Am I doing something wrong? Bug? The stars appear, but is the database column definition actually numeric that can be sorted on?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | fivestar-1327878-4.patch | 2.05 KB | ericduran |
| #3 | fivestar-1327878-4.patch | 2.05 KB | plach |
| #2 | fivestar-1327878-3.patch | 2.06 KB | plach |
Comments
Comment #1
acarpio commentedI'm having the same issue and also wondering if I'm doing something wrong or it is a bug.
I'm using last dev releases for views, fivestar and all other modules required, developing localhost.
I will appreciate any help.
Comment #2
plachViews is unable to sort by rating because when voting in view mode (through the ajax widget) the result is stored only in the votingapi tables and not into the field storage. The attached patch should fix this use case (existing votes will need to be re-entered).
Comment #3
plachCleaner patch
Comment #4
acarpio commentedThis patch is working for me: views is sorting as expected, both Asc and Desc.
Thanks so much, plach.
Comment #5
Gastonia commentedthanks for the patch! will this be included into the next dev release?
Comment #6
ericduran commentedThis looks great. Can we add some test?
Also one minor thing :
The language shouldn't be hard-coded into LANGUAGE_NONE.
Comment #7
ericduran commentedre-Uploading last patch to trigger test.
Comment #8
ericduran commentedComment #9
ericduran commented@plach, lol I just saw the language code above the comment.
Comment #10
plachSo we just need tests here to have this fixed, right?
Comment #11
ericduran commentedYea, test would be great! :)
Comment #12
ericduran commentedOk, I made some changes, but this is fixed now. -- http://drupalcode.org/project/fivestar.git/commit/b667347
Thanks everyone.
Comment #13
plachGreat, I'll see if I can find the time to write some tests anyway.