Closed (fixed)
Project:
Voting API
Version:
7.x-2.x-dev
Component:
Views Integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2012 at 06:42 UTC
Updated:
10 Mar 2012 at 09:00 UTC
Hello, I ran into a small problem setting up a view. Comment: Vote results is missing from views, I'm not sure if its called something else now but I'm setting up a view to sort comments with most points using voteupdown.module and/or rate.module and did not find "Comment: Vote results" relationship in views. There are already issues regarding this in those two module's issue queue, but I think its a voting api issue rather than modules that use voting api. Can someone please shed some light on this? thank you.
Comments
Comment #1
forssto commentedHi!
I ran into this problem today as well and the solution was surprisingly simple.
Unfortunately I've never submitted a patch to a Drupal project, but since I'm in a huge rush, I'll leave learning that for another day.
The problem can be found in votingapi.views.inc file on line 290 where the base_table property for comment relationships is defined as "comments", while the actual table name is singular "comment".
So if you just remove that one s-character, you're filter / relationship will appear and magically make everything good again.
Once I have a second of time, I'll see if the bug still exists in the latest dev branch and if it does, I'll submit a patch. If somebody else wants to do it, please go ahead.
Comment #2
eaton commentedFixed and ready for release in the 2.5 version.
Comment #3
Desi Raaj commentedthank you :)