Project:Content Access
Version:6.x-1.2
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi, i posted here in german the same
http://www.drupalcenter.de/node/21066

I had a running view of a contenttype but for a better control who can view something, i install content_access and acl.
after this and viewing my view i get this error: once in live preview and in normal view:

* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node' at line 1 query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node_data_field_firmenname_field_firmenname_value, node.type AS node_type, node.vid AS node_vid FROM node node LEFT JOIN content_type_firmen_liste node_data_field_firmenname ON node.vid = node_data_field_firmenname.vid WHERE node.type in ('firmen_liste') ORDER BY node_data_field_firmenname_field_firmenname_value ASC ) count_alias in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/web/sites/default/modules/views/includes/view.inc on line 729.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node' at line 1 query: SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node_data_field_firmenname_field_firmenname_value, node.type AS node_type, node.vid AS node_vid FROM node node LEFT JOIN content_type_firmen_liste node_data_field_firmenname ON node.vid = node_data_field_firmenname.vid WHERE node.type in ('firmen_liste') ORDER BY node_data_field_firmenname_field_firmenname_value ASC LIMIT 0, 25 in /srv/www/vhosts/xxxxxxxxxxxxxxx.de/httpdocs/web/sites/default/modules/views/includes/view.inc on line 755.

The query is under the errormessage in views2:

SELECT DISTINCT(node.nid) AS nid,
   node_data_field_firmenname.field_firmenname_value AS node_data_field_firmenname_field_firmenname_value,
   node.type AS node_type,
   node.vid AS node_vid
FROM node node
LEFT JOIN content_type_firmen_liste node_data_field_firmenname ON node.vid = node_data_field_firmenname.vid
WHERE node.type in ('firmen_liste')
   ORDER BY node_data_field_firmenname_field_firmenname_value ASC

in errorlog in drupal i found this:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node' at line 1 query: SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_data_field_firmenname.field_firmenname_value AS node_data_field_firmenname_field_firmenname_value, node.type AS node_type, node.vid AS node_vid FROM node node LEFT JOIN content_type_firmen_liste node_data_field_firmenname ON node.vid = node_data_field_firmenname.vid WHERE node.type in ('firmen_liste') ORDER BY node_data_field_firmenname_field_firmenname_value ASC LIMIT 0, 25 in /srv/www/vhosts/xxxxxxxxxx.de/httpdocs/web/sites/default/modules/views/includes/view.inc in Zeile 755.

So is there any hint for me to run views2 with content_access ?

regards simpsonetti

Comments

#1

Category:bug report» support request
Status:active» closed (fixed)

This is a known bug in the core. Changed to support / closed.

http://drupal.org/node/284392
http://www.lullabot.com/blog/views-distinct-node-access-problems

SELECT DISTINCT(node.nid) AS DISTINCT(node.nid)