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

tmarly’s picture

Status: Active » Closed (duplicate)

It 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.