I have a project to sort a number of posts by five star rating in descending order and also by date posted. Using only row style node (because fields do not display 5 star information?):

Sort Criteria:
Voting API results: Value desc
Node revision: Created date desc

Filters:
Node: Type = custom

Is it that there was a sort by "Voting Results - Average" in 5.x and it is not present in 6.x?

*** The problem in this is that duplicate nodes are being generated out of order despite using "distinct=yes". ***

Page reference: http://www.thenewstayathomemom.com/wahops

Questions:
1. How to eliminate the duplicate posts in this query?
2. Is "Voting API results: Value" the best way to sort for average 5 star value in 6.x? Or would an alternate / combination of terms be better?
3. Is it possible to have the 5 star rating system appear with "field view" as well as "row style node"?

Thanks in advance for any assistance with this.

Comments

eaton’s picture

Project: Views (for Drupal 7) » Voting API
Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » eaton
Category: support » bug

This is actually an issue in the VotingAPI 2.x views integration. I'll take a look -- thanks.

eaton’s picture

Status: Active » Fixed

Fixed in the latest beta -- sorts are now available for all values.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

RamMohanSakhamuri’s picture

Component: Code » Miscellaneous
Assigned: eaton » Unassigned
Category: bug » support
Priority: Normal » Critical
Status: Closed (fixed) » Active

how can i get "voting api" in the sort criteria in the views? is there any process for enabling it. I am using Views6.x,Five star, Voting API. Here i am unable to get voting API, i has tried with 'row style - node' as u suggested. Now i need to get most rated content. can you help me to sort out this issue.

Thanx,
RaamS

markDrupal’s picture

I'm looking for the answer for this as well, Mine seems to have disappeared with an upgrade from Views 6.x-2.0-rc1 to 6.x-2.0-rc3
Seems they made some API change that broke all modules using it and I haven't found the documentation that says what was changed from rc1 to rc2 ?

markDrupal’s picture

Found some info: http://www.angrydonuts.com/attention-views-api-developers
I am going to try to get a patch of this out in a few days

eaton’s picture

markDrupal, the issue you're describing is a different one. VotingAPI beta7 includes the new Views2 API changes, so if you're not seeing any sorts and filters after adding a relationship to the View, it's something different going on.

markDrupal’s picture

Ok, Your right. Setting up a "relationship" fixed the problem. I had upgraded from BETA 5 to BETA 7 and some of the sorts were broken until I set up the relationship.

eaton’s picture

Status: Active » Fixed
RamMohanSakhamuri’s picture

Yeah ! exactly Setting the relationship and select Voting API fixxed my problem.... My issue also fixed regarding Rating using Views.

Thanks to All
Rams

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

Invincible123’s picture

Component: Miscellaneous » Unit tests
Status: Closed (fixed) » Active

My users add ratings along with comments. In my search results I need a filter on average rating. I understand that for this I need to add a relationship in my view. I have added 'Node: Vote results' in relationship. How when I try to add a filter based either on Vote:Results or Vote:Function I get to see some operators. But I need the operator 'Is one of' as I need to select from a list. This operator normally appears on other CCK filters,how can I get it in this one?

deciphered’s picture

Component: Unit tests » Miscellaneous
Status: Active » Closed (fixed)

Invincible123,

Please don't re-open an issue that's been closed for over two years, it's rude and your comment will likely be ignored.

Open a new issue and reference this issue if you truly believe there is correlation.

Cheers,
Deciphered.