Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.3
Component:
Views Data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2009 at 07:58 UTC
Updated:
31 Mar 2009 at 18:30 UTC
A SQL statement generated by Views produces the following. The problem seems to be SELECT DISTINCT(node.nid) AS DISTINCT(node.nid). If I change it to SELECT DISTINCT(node.nid) , that the View works.
Any idea why?
Thanks,
(It used to work. After upgrading from 6.9 to 6.10 and installed a few other must-have modules, the View corrupts)
SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_data_field_ref_author.field_ref_author_value AS node_data_field_ref_author_field_ref_author_value, node_data_field_ref_author.nid AS node_data_field_ref_author_nid, node.type AS node_type, node.title AS node_title, node_data_field_ref_author.field_ref_pdf_fid AS node_data_field_ref_author_field_ref_pdf_fid, node_data_field_ref_author.field_ref_pdf_list AS node_data_field_ref_author_field_ref_pdf_list, node_data_field_ref_author.field_ref_pdf_data AS node_data_field_ref_author_field_ref_pdf_data, node_data_field_ref_author.field_ref_pubdate_value AS node_data_field_ref_author_field_ref_pubdate_value, node_data_field_ref_author.field_ref_link_url AS node_data_field_ref_author_field_ref_link_url, node_data_field_ref_author.field_ref_link_title AS node_data_field_ref_author_field_ref_link_title, node_data_field_ref_author.field_ref_link_attributes AS node_data_field_ref_author_field_ref_link_attributes FROM node node INNER JOIN content_field_ref_keyword node_data_field_ref_keyword ON node.vid = node_data_field_ref_keyword.vid LEFT JOIN content_type_reference node_data_field_ref_author ON node.vid = node_data_field_ref_author.vid WHERE (node.type in ('reference')) AND (node.status <> 0) AND (node_data_field_ref_keyword.field_ref_keyword_value = 'Capacity building') LIMIT 0, 10
Comments
Comment #1
karens commentedThat is a core bug when you use modules that have access control. See #284392: db_rewrite_sql causing issues with DISTINCT, Views can't do anything about this.
Comment #2
bigheadfish commentedBefore I upgraded to 6.10 (was 6.9), it worked.
Comment #3
karens commentedIt doesn't matter, the problem is the core bug I noted above.