On 6.x-1.2
I have the :

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_revisions.teaser AS node_revisions_teaser, node_r' at line 1 query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_revisions.teaser AS node_revisions_teaser, node_revisions.format AS node_revisions_format, node.created AS node_created FROM node node LEFT JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = 57 LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE (term_data.vid in ('10')) AND (term_node_value_0.tid = 57) ORDER BY node_created DESC ) count_alias in /var/www/sites/all/modules/views/includes/view.inc on line 699.

An idea ???
thanx U

Comments

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

The two distincts look really wrong to me, in SELECT DISTINCT(node.nid) AS DISTINCT(node.nid)

I don't think this has anything to do with tac_lite, though. Looks like a problem in the original query, or what db_rewrite_sql is doing to the query. Do you get the same problem with tac_lite disabled?

Dawa’s picture

Hi dave,

I've disabled the tac_lite module and there is no error ... everything is fine.

I'm trying to use tac_lite for making private content:
Each content with the taxonomy term "private" is visible on a view page only for member role.

I just re-checked and everything works fine without tac_lite ...
??
Maybe the devel module will help. I'll try this.

thanks dave

mcfilms’s picture

I had a similar problem. This shows up with tac_lite enabled and goes away when it it disabled:

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_projposter.field_projposter_fid AS node_d' at line 1 query: SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_data_field_projposter.field_projposter_fid AS node_data_field_projposter_field_projposter_fid, node_data_field_projposter.field_projposter_list AS node_data_field_projposter_field_projposter_list, node_data_field_projposter.field_projposter_data AS node_data_field_projposter_field_projposter_data, node_data_field_projposter.nid AS node_data_field_projposter_nid, node.type AS node_type, node_data_field_projposter.field_projblurb_value AS node_data_field_projposter_field_projblurb_value, node_data_field_projrank.field_projrank_value AS node_data_field_projrank_field_projrank_value FROM node node LEFT JOIN content_type_aproject node_data_field_projposter ON node.vid = node_data_field_projposter.vid LEFT JOIN content_type_aproject node_data_field_projrank ON node.vid = node_data_field_projrank.vid WHERE node.type in ('aproject') ORDER BY node_data_field_projrank_field_projrank_value ASC LIMIT 0, 4 in /home/ringlead/public_html/sites/all/modules/views/includes/view.inc on line 731.

It appears to be a conflict between Taxonomy Access Control Lite and the way we are sorting and displaying nodes (using Taxonomy) on the page. But why would it be throwing a syntax error when Taxonomy Access Control Lite is enabled?

Dave Cohen’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)