I'm not sure why this happened but all of a sudden my drupal 5.1 site is displaying this sql warning on every page regardless of being logged in or not. If I disable the Tac_lite module the warning goes away.
The last module I had installed was workflow 5, but it the error started happening about half an hour after this, could it be related?
I'm fairly certain it's not any of my custom code interfering - have disabled all my custom blocks.
Here is the error 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 'AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite')) AND grant_view >= 1' at line 1 query: SELECT COUNT(*) FROM node_access WHERE nid = 0 AND ((gid = 0 AND realm = 'all') OR (gid = AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite')) AND grant_view >= 1 in /home/oprior/drupal/includes/database.mysql.inc on line 172."
Anyone ever had this issue?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | tac_lite_sql_error.diff | 1.71 KB | Dave Cohen |
| #8 | 131077_debug.diff | 1.01 KB | Dave Cohen |
Comments
Comment #1
oprior commentedI have now noticed that in actuality, the error is only ocurring on Administration pages. Another interesting part is that the tac_lite module still performs normally, restricting access to nodes for each user without errors.
So it must be some other module screwing it up. Will try disabling other modules....
Comment #2
oprior commentedNope. Disabling Optional modules didn't help.
Weird eh?
Comment #3
Dave Cohen commentedI'm travelling this month and will have no internet access for a while. Will look into this after some weeks, if the solution is not found.
Comment #4
oprior commentedHi!
I still haven't found a solution for this problem. A quick update:
SQL error everytime the Admin accesses a page:
php
Date Wednesday, September 19, 2007 - 16:33
User qualitycraft
Location http://qclangley.plexio.com:8080/drupal/secondarynavigation/marketingmat...
Referrer http://qclangley.plexio.com:8080/drupal/admin/logs/watchdog
Message 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 'AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite') OR (gid = 0 AND real' at line 1 query: SELECT COUNT(*) FROM node_access WHERE nid = 0 AND ((gid = 0 AND realm = 'all') OR (gid = 2 AND realm = 'workflow_access') OR (gid = 6 AND realm = 'workflow_access') OR (gid = 1 AND realm = 'workflow_access_owner') OR (gid = AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite') OR (gid = 227 AND realm = 'tac_lite') OR (gid = 0 AND realm = 'tac_lite')) AND grant_view >= 1 in /home/marketing/drupal/includes/database.mysql.inc on line 172.
Severity error
Hostname 24.82.92.133
Disabling TAC_Lite makes the error go away
Happening on every page, not just administration as I had previously said.
I would greatly appreciate any help me with this -- it's totally out of my league :)
Comment #5
oprior commentedI forgot to mention that I recently updated to 1.0 -- didn't fix it.
Comment #6
Dave Cohen commentedWhat taxonomy are you using to control privacy, and how many terms are in it?
Have you added that taxonomy to a node type, but have an old node somewhere with no term associated with it?
Comment #7
oprior commentedHi,
I made a Vocabulary called "Exclusive", associated it with a CCK content type called "Exclusive Product."
Hierarchy, related terms, free tagging, and required are disabled; multiple select is enabled and weight is 0.
There are several hundred terms, one for each Customer which is tagged on the Product and on the customer's user profile.
Currently there are 13 "Exclusive Products" that are un-tagged. Required is disabled in the taxonomy -- are there known issues with this?
Thanks,
Owen
Comment #8
Dave Cohen commentedCan you help track this down?
Enable the devel module and grant your user permission to view devel info, if you haven't already.
Then, apply this patch. It will add some debug output to the pages. Paste that debug output back here.
Thanks.
Comment #9
Dave Cohen commentedIf anyone can reproduce this problem, please try the attached patch and let me know if it solves it. The previous patch was just to get extra information.
Comment #10
Dave Cohen commentedThe above patch has been committed. Please re-open this issue if it does not solve the problem.
Comment #11
mrintegrity commentedI was having this error, just tested the new version - works perfectly. Thanks Dave!
Comment #12
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.