Hi, I get the following error message when using rolereference as "normal" user. The error does not appear, when creating the node as admin. Any help on this would be most appreciated. Thank you!
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT r.rid, r.name FROM role r INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 2 AND na.realm = 'term_access') OR (na.gid = 18 AND na.realm = 'term_access') OR (na.gid = 19 AND na.realm = 'term_access'))) AND ( (r.rid = 2 OR r.rid = 11 OR r.rid = 10 OR r.rid = 19 OR r.rid = 13 OR r.rid = 18) )ORDER BY r.name in /www/htdocs/xqbzzr/mm/sites/all/modules/rolereference/rolereference.module on line 614.
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT r.rid, r.name FROM role r INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 2 AND na.realm = 'term_access') OR (na.gid = 18 AND na.realm = 'term_access') OR (na.gid = 19 AND na.realm = 'term_access'))) AND ( (r.rid = 2 OR r.rid = 11 OR r.rid = 10 OR r.rid = 19 OR r.rid = 13 OR r.rid = 18) )ORDER BY r.name in /www/htdocs/xqbzzr/mm/sites/all/modules/rolereference/rolereference.module on line 614.
Comments
Comment #1
cyu commentedI see. The call to db_rewrite_sql() should not be there on line 613 but was probably left over from copy/paste of nodereference module. I'll fix that up, but for the time being you can remove that function call and make line 613:
Comment #2
lavamind commentedThe fix seems to work for me. Could this be integrated in a release?
Raising priority to critical as this bug breaks the module with any account other than uid=1 ...
Comment #3
deekayen commentedThis was already fixed in -dev. I'll make a new release node.