Hello, I installed Drupal on my site and after successfully configuring the site I moved it to my root folder and it now serves as my main site:http://www.musicollaborate.com/

But, when I logout or visit the pages as an unauthorised user, I get the following message:

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 'INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((n' at line 1 query: INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'term_access'))) LIMIT 0, 5 in /home/musicoll/public_html/includes/database.mysql.inc on line 172.

I am sure it is something to do with user access control, but I don't know where to start.

Any help will be appreciated.

Comments

cog.rusty’s picture

From this broken SQL query, it seems that you are using the taxonomy_access module. Are you using any other access control module together with it? (such as organic groups, og roles, domain, node privacy byrole, ...)

===== Edited to add:

Second thought: Are you using the views module? What version exactly? (and what is your Drupal version?)

hugeknot’s picture

Hey thanks for getting back to me!

Yes, I am using taxonomy 5.7, and views 5.x-1.6, they are both required because of the forum and audio options that I want.

My drupal version is 5,7 - this is because I desparately wanted the 'Track'n'Stack 5.x-1.x-dev' which hasn't been updated for V6.

cog.rusty’s picture

I meant what was your version of taxonomy_access, not taxonomy. The taxonomy access control module seems to participate in the broken query.

hugeknot’s picture

Taxonomy Access Control 5.x-1.x-dev

Edit: I just upgraded it to V 5.x-1.1, but issue still there.

I have confined the error reporting to the logs, it doesn't seem to affect anything on the site.

cog.rusty’s picture

The "LIMIT 0, 5" phrase at the end of the broken query indicates that it must be a block (it tries to show only 5 items). If you have any views blocks which appear on the page with the error, try to open them and save them again.

It looks like a block has nothing to show, but still the taxonomy access module tries to check if the user has permission to see that "nothing".

(Of course this does not happen for user 1, who can see everything anyway.)

hugeknot’s picture

Excellent!

That has fixed it, I just opened the config on a few blocks, played around with them and the error disapeared.

many thanks!