Hi
I've just installed your module on my site. the use case is as follows: I have a content type that I want multiple users to have access to when they choose to link their user profile to a node of that type. So I have 200 or so nodes built using the content type. When a user edits their profile they can choose to link to one or more of these nodes via a nodereference.
I have a View that provides a sortable listing of all of the nodes using this content type.
I activate the module and rebuild the permissions. Immediately my view stops working, with the error reported as follows:
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.title AS node_title, node_data_field_county.field' at line 1 query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node.title AS node_title, node_data_field_county.field_county_value AS node_data_field_county_field_county_value, node.type AS node_type, node.vid AS node_vid, node_data_field_county.field_region_value AS node_data_field_county_field_region_value, node_data_field_county.field_structure_value AS node_data_field_county_field_structure_value, node_data_field_county.field_management_value AS node_data_field_county_field_management_value, node_data_field_county.field_established_value AS node_data_field_county_field_established_value FROM node node LEFT JOIN content_type_shop_profile node_data_field_county ON node.vid = node_data_field_county.vid WHERE (node.status <> 0) AND (node.type in ('shop_profile')) ORDER BY node_title ASC ) count_alias in /path/to/site/all/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.title AS node_title, node_data_field_county.field' at line 1 query: SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node.title AS node_title, node_data_field_county.field_county_value AS node_data_field_county_field_county_value, node.type AS node_type, node.vid AS node_vid, node_data_field_county.field_region_value AS node_data_field_county_field_region_value, node_data_field_county.field_structure_value AS node_data_field_county_field_structure_value, node_data_field_county.field_management_value AS node_data_field_county_field_management_value, node_data_field_county.field_established_value AS node_data_field_county_field_established_value FROM node node LEFT JOIN content_type_shop_profile node_data_field_county ON node.vid = node_data_field_county.vid WHERE (node.status <> 0) AND (node.type in ('shop_profile')) ORDER BY node_title ASC LIMIT 0, 30 in /path/to/site/all/modules/views/includes/view.inc on line 755.I disable the module, rebuild permissions, and it all works fine. Any advice as to what might be going wrong, and better still, how I might overcome it?
Comments
Comment #1
kenorb commentedHave you tried latest dev version?
Comment #2
tobedeleted commentedThanks for the feedback. The error was actually down to what I understand is a bug in Drupal core. The View was set to only include distinct items. I turned that option off and all was well, in that the warnings went away. I'm now testing to see of the author reference module does changes the permissions as I want.
Comment #3
kenorb commented