Hi all,
I keep getting this 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 = 'domain_id')) AND grant_view >= 1' at line 1 query: SELECT COUNT(*) FROM drpl_node_access WHERE (nid = 0 OR nid = 708) AND ((gid = 0 AND realm = 'all') OR (gid = AND realm = 'domain_id')) AND grant_view >= 1 in /home/......../php/drupal/modules/node/node.module on line 2049.
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 = 'domain_id')) AND grant_view >= 1' at line 1 query: SELECT COUNT(*) FROM drpl_node_access WHERE (nid = 0 OR nid = 708) AND ((gid = 0 AND realm = 'all') OR (gid = AND realm = 'domain_id')) AND grant_view >= 1 in /home/......./php/drupal/modules/node/node.module on line 2049
Is this a bug?
Cheers,
DrupalFan
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 477290-docs.patch | 8.58 KB | agentrickard |
Comments
Comment #1
agentrickardIt looks like the Domain Access module is either:
a) not installed correctly
b) running on a misconfigured host
The problem area is this:
OR (gid = AND realm = 'domain_id'))gid should never be passing _no value_ here. This suggests to me that the $_domain global is not being set correctly.
Other than that, there is not enough information here to offer any help.
Comment #2
eldrupal commentedThank you for pointing out the error in the SQL. The bug is invoked only upon creating a new article, right after submission. I have started seeing this error sporadically after I have activated domain_source. The installation does not seem to be malfunctioning.
Comment #3
alex.cunha commentedI got this warning on the admin interface:
On the user (site front end for anonymous users) the list of warnings is bigger.
Just after enabled modules:
Domain Access 6.x-2.0-rc8
Domain Configuration 6.x-2.0-rc8
Domain Content 6.x-2.0-rc8
Domain Navigation 6.x-2.0-rc8
Domain Theme 6.x-2.0-rc8
Drupal 6.12
MySQL 5.1.30
PHP 5.2.8
Comment #4
agentrickardNo, you have Domain Blocks installed as well. This is either a Domain Blocks bug, or you have the same configuration problem as listed above.
"the list of warnings is bigger" is useless information. Either be detailed or don't report.
Comment #5
nonsieBeing a maintainer of Domain Blocks all I can say is something is not right with your Domain Access install. For some reason you're missing domain_id in your query. Did you by any chance alter domain IDs in the db?
Comment #6
agentrickardI wonder if this is the ghost bug of domain 0 disappearing from the db?
Comment #7
avpadernoComment #8
agentrickardThis is NOT a SQL bug. It is a processing error caused by either a) bad site configuration or b) a missing database row.
The question is: Why is
$GLOBALS[$_domain]['domain_id']not populated correctly?We cannot replicate because we are not affected by a) or b), and no one can reliably report the cause.
Comment #9
alex.cunha commentedI have restored the database to the point before the domain access install and I will try again today using a testing environment and giving more detailed information.
If you can suggest ideas to debug better I will follow your instruction.
Thanks.
Comment #10
agentrickardAfter you re-install, make sure that the {domain} table contains a row 0. This is your default domain.
Otherwise, you should get error messages (clearly marked as Domain Access errors, not database query errors) if the module is not installed correctly.
Comment #11
alex.cunha commentedOk, have restored the database and I'm using a sub-domain as a test environment.
Just enabled one module: Domain Access 6.x-2.0-rc8.
After module activation, the modules list shows this:
My settings.php just points to the database. Is required any change on the settings.php? Looking into the manual, seems there are not.
Looking into the database seems I have at least 3 new tables:
domain has 1 record
domain_access has 114 records
domain_editor has 128 records
Also node_access was updated.
Table contents:
node access before install Domain_access
node access after install Domain_access
SELECT * FROM `domain`0 multi.domain.com domain.com http 1The content of this tables, looks strange:
SELECT * FROM `domain_access` LIMIT 0 , 30SELECT * FROM `domain_editor` LIMIT 0 , 10Why these tables are populated this way?
If necessary more info, please ask.
By the way, the link to docs is not available (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/domain/READ...)
Comment #12
alex.cunha commentedok, the problem describe before was gone after I add this line
include './sites/all/modules/domain/settings.inc';into the settings.php
May I suggest add to the docs (linked at the module drupal.org frontpage) a reference to the INSTALL_QUICKSTART.txt?
I missed this important step!
thanks
Comment #13
agentrickardNo. This is clearly documented now. If you don't read the provided docs, that is user error.
The quickstart is for people too "busy" to read the full INSTALL.txt.
We should probably clarify section 2 of README.txt.
Comment #14
agentrickardComment #15
agentrickardComment #16
eldrupal commented@agentrickard: indeed, a missing database row (row 0 in the domain table) was the cause of the problem. Thank you for identifying it.
Comment #17
agentrickardThis is still a documentation task.
@DrupalFan
The question is -> Why was there a missing database row? Did you not run the upgrade?
Comment #18
agentrickardCleaned up the README a bit and added some more helpful text in two places of the UI.