Closed (duplicate)
Project:
Voting API
Version:
6.x-2.2
Component:
Views Integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2009 at 18:58 UTC
Updated:
1 Aug 2009 at 19:06 UTC
I want a view that sort nodes according to their score.
So I added a relation "node: vote results", with only one filter (for now): "value_type=points". (I checked the table votingapi_cache to make sure this was the correct filter).
The I got the following warning:
* user warning: Unknown column 'votingapi_cache_node_points_points.value_type_other' in 'on clause' query: SELECT COUNT(*) FROM (SELECT node.nid AS nid FROM node node LEFT JOIN votingapi_cache votingapi_cache_node_points_points ON node.nid = votingapi_cache_node_points_points.content_id AND (votingapi_cache_node_points_points.content_type = 'node' AND votingapi_cache_node_points_points.value_type = 'points' AND votingapi_cache_node_points_points.value_type_other = 'points') WHERE node.status <> 0 ) count_alias in /var/www/drupal/sites/default/modules/views/includes/view.inc on line 729.
* user warning: Unknown column 'votingapi_cache_node_points_points.value_type_other' in 'on clause' query: SELECT node.nid AS nid, node.created AS node_created FROM node node LEFT JOIN votingapi_cache votingapi_cache_node_points_points ON node.nid = votingapi_cache_node_points_points.content_id AND (votingapi_cache_node_points_points.content_type = 'node' AND votingapi_cache_node_points_points.value_type = 'points' AND votingapi_cache_node_points_points.value_type_other = 'points') WHERE node.status <> 0 ORDER BY node_created DESC LIMIT 0, 10 in /var/www/drupal/sites/default/modules/views/includes/view.inc on line 755.
Comments
Comment #1
tmarly commentedIt seems the problem occurs when we defined a customized tag for the votes. So this issue is a dupplicate of #527970: 'Other' option for Relationships filters in views creates a non valid query, the patch given in the comments works for me.