Views integration isn't working
SpikeX - June 25, 2009 - 06:24
| Project: | Voting API |
| Version: | 6.x-2.0-rc2 |
| Component: | Views Integration |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I don't know why, but nothing for the VotingAPI shows up in Views. I tried reinstalling Fivestar/VotingAPI, I'm using the latest version of views and VotingAPI (I even re-downloaded it), nothing seems to work, though. VotingAPI and Fivestar sections do not appear in Views whatsoever, not in the Filters or Fields or Sorting.
Ideas?

#1
Have you added a 'relationship' to the View? VotingAPI stores a large amount of data, making it necessary to use 'relationships' to set up links to just the stuff you need. Once you add a relationship, you can add the fields/filters/sorts/etc.
#2
Ah, that was the problem. But Fivestar still doesn't show up.
Let me explain what I'm trying to do. I have a node listing in a grid-style using CCK and Imagefield (sort of a "gallery", if you will). I'd like to be able to sort by "rating", that is, display the highest rated nodes first. If multiple nodes have the same score (say 4.5/5), I'd like it to then sort by the number of votes, so the one with the most votes displays first.
If possible, too, I'd like a static Fivestar display in each node listing, as well (in the grid, under the image).
#3
This is what I did:
- add a Relation with Voting API, and make sure all filters have a setting
- save the view
- then go to Sort Criteria > Vote Results to add a sorting.
Thanks.
#4
'Fivestar' won't actually show up in the list of fields, sorts, etc -- it doesn't give any custom data to Views at all. All it provides is a formatter for fields so that 'value' fields can be displayed as stars. You'll need to add basic VotingAPI fields to get the data to show up.
Also, please ensure you're using VotingAPI 2.1, the latest version. The official releases have a number of fixes -- for value sorting in particular -- that were not present in the RC2 release.
#5
Ah, 2.1 is actually new (2 days ago), and I just heard about it now. I'll upgrade as soon as I get a chance, thanks.
#6
#7
Automatically closed -- issue fixed for 2 weeks with no activity.