Closed (won't fix)
Project:
Voting API
Version:
5.x-1.6
Component:
Views Integration
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2009 at 13:33 UTC
Updated:
11 Jan 2011 at 16:17 UTC
I used to use the sort criteria in my views: "points vote result (sum)"
There now seems to be no "points" option anymore, only "percentage".
What might have happened her? Any clues at all?
Many thanks,
Comments
Comment #1
alfaguru commentedThis issue is I think caused by a fundamental design error in the votingapi views integration. The options for views tables are all generated using a query on the tables used to store the votes, which is just plain wrong for a number of reasons, not least performance - the default query has to scan the entire table to return a result. It also means that you cannot create views using votingapi until you have some votes stored.
I can see that the author thought this would make the views settings flexible and extensible, but what would be better, I think, would be to use options to allow the views fields etc to be parameterised.
I don't have a patch right now but in the short term I may rewrite the _votingapi_views_values() function to return a hard-coded set of values for each combination of arguments.
Comment #2
alfaguru commentedFurther to my previous comment, there are some default values when the tables are empty but they don't include points, only percent, which is I think the root of your problem.
Comment #3
eaton commentedSupport for the 5.x branch of VotingAPI has ended with the release of Drupal 7 and the upcoming release of VotingAPI 7.x-2.4.
Comment #4
eaton commented