I'm getting the following warning every time a forum topic or comment is posted :
* user warning: Column 'tid' in where clause is ambiguous query: SELECT COUNT(*) - 6 FROM term_data LEFT JOIN forum_access fa ON term_data.tid = fa.tid LEFT JOIN acl acl ON acl.name = term_data.tid AND acl.module = 'forum_access' LEFT JOIN acl_user aclu ON aclu.acl_id = acl.acl_id AND aclu.uid = 0 WHERE ((fa.grant_view >= 1 AND fa.rid IN (1)) OR fa.tid IS NULL OR aclu.uid = 0) AND ( tid <= 10) in /home/tin/public_html/includes/database.mysql.inc on line 172.
* user warning: Column 'tid' in where clause is ambiguous query: SELECT * FROM term_data LEFT JOIN forum_access fa ON term_data.tid = fa.tid LEFT JOIN acl acl ON acl.name = term_data.tid AND acl.module = 'forum_access' LEFT JOIN acl_user aclu ON aclu.acl_id = acl.acl_id AND aclu.uid = 0 WHERE ((fa.grant_view >= 1 AND fa.rid IN (1)) OR fa.tid IS NULL OR aclu.uid = 0) AND ( tid <= 10 ) ORDER BY tid LIMIT 0, 6 in /home/tin/public_html/includes/database.mysql.inc on line 172.
I know what the issue is. It is using tid <= 10 without really using the table prefix as tid. Ideally it should read term_data.tid or fa.tid. The problem is I can't find this query in the forum_access module and I've searched from the root for <= 10 and also for tid <= but I can't quite find that string.
Is there anyway the error reporting be turned off in Drupal?
Comments
in the settings.php file
in the settings.php file add
ini_set('display_errors', 0);
This can also be done in the .htaccess file:
php_value display_errors 0
This can also be done in teh Apache httpd.conf file but you probably don't have access to that.
Thanks heaps for that, I've
Thanks heaps for that, I've gone for ini_set('display_errors', 0);
Cheers
How about a fix?
Hiding the error seems like sweeping bread crumbs under the rug. Is there a way to correct the problem?
Sensible
http://drupal.org/node/152239
gsitemap module was the only one I could find that could produce this error. Above issue provides patch fix (needs testing). Can the original forum poster confirm that module is installed on their site?
I can confirm
I am not the original poster, but I can confirm that I'm using http://drupal.org/project/gsitemap and I'm getting the nastiness. I'd rather leave it on though and figure out a solution, I was going to apply your patch but it looks like the howtos point to me having a HEAD version of drupal. I'll look into it and test the patch.