I setup a simle view to list nodes, but as soon as i add a filter like "has been voted on" or a field like "number of votes", I dont get any data in the view, just the heading.

When i view my nodes all voting information seems to be in place and totally usable

have tried votingAPI CVS + views CVS as well as 4.7 of both

Comments

eaton’s picture

Title: View fails when using votingAPI for fields or filters » VotingAPI: Views with vote filters display no records
Project: Views (for Drupal 7) » Voting API
Version: 4.7.x-1.x-dev » master
Assigned: Unassigned » eaton

This is an issue with VotingAPI's views integration code -- Views is doing fine. I'll take a look at it: the filtering code that I'm using is really sub-optimal and needs to be refactored. It's probably conflicting with the newer and more effective (but subtly different) code for handling the Fields.

seanenroute’s picture

Hi, I was wondering if a fix has been worked out. Whenever I try to use the "VotingAPI: Voting results" as a field in Views it comes back with a blank page for a result. When I remove the "VotingAPI: Voting results" field I get a complete table or list of results. When I display as a Teaser I get results, just not when used in Table or List view.

I'm running the current versions 4.7.3 and the latest download of all the modules.

pshadow’s picture

I'm having same issue, any updates? I'm using simplevote and a View (table) to display avergae votes in a column. This seems to work, but when adding another column to display total number of votes I get nothing back, table data disappears.

tom611’s picture

Eaton, are you planning a 4.7 fix for votingapi and views? It is a big missing piece for me right now. Thanks for all your hard work on this!

Tom

marcoBauli’s picture

+1 for fix

Really needing this: willing to offer testing, feedback, $!

hyperlogos’s picture

Another vote for putting this on the critical list. I'm personally experiencing it in 4.7. Without it, voting is useless to me, because the only place you can see a list of the type of content I want people to be able to vote on is a view.

kbahey’s picture

The change mentioned in #7 at http://drupal.org/node/68718 solved this for me.

marcoBauli’s picture

I'm still having problems with the 'VotingAPI: Current user has voted' -> voted on by currently logged in user.

Tryed with different settings (List View, Teaser List,..) and also applying the fix #7 at http://drupal.org/node/63430 but i keep getting no results and the following warnings:

    * user warning: Unknown table 'votingapi_vote' in where clause query: SELECT count(node.nid) FROM node node WHERE (node.status = '1') AND (votingapi_vote.uid = '1') in /public_html/drupal/includes/database.mysql.inc on line 120.
    * user warning: Unknown table 'votingapi_vote' in where clause query: SELECT node.nid, node.title AS node_title, node.changed AS node_changed FROM node node WHERE (node.status = '1') AND (votingapi_vote.uid = '1') ORDER BY node.created DESC LIMIT 0, 15 in /public_html/drupal/includes/database.mysql.inc on line 120.

is anyone else experiencing this? cheers

PS: latest Voting_api, Views and Drupal 4.7.2

eaton’s picture

Status: Active » Fixed

As of this evening at 2:06 AM, views integration for VotingAPI has been rewritten from scratch. All hail views! The good news? It should actually work. The bad news? You'll need to remove and re-add any VotingAPI fields that you had on existing Views. This shouldn't be problematic, as the old views integration was completely broken anyhow.

Caveats: Output formatting of vote results, etc is still being finished. In addition, much more testing is needed before it can be said that the new integration code is 'ready for prime time.' But it's definitely much better. I'm going to be closing the existing threads regarding VotingAPI and Views because all of them point to known issues with the *old* versions of the code. Those interested in testing the new code can download the latest VotingAPI from: http://drupal.org/node/128605

Thanks for your patience!

Anonymous’s picture

Status: Fixed » Closed (fixed)
dgtlmoon’s picture

thanks! awesome work!

cheers

leigh