when enter admin page it says:
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 'DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmod query: SELECT v.vote, nmuv.value, nmuv.uvid, DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmoderation_uservotes nmuv INNER JOIN nmoderation_votes v ON nmuv.mid = v.mid INNER JOIN node n ON nmuv.gid = n.nid AND nmuv.realm = 'node_nid' INNER JOIN users u ON nmuv.uid = u.uid WHERE (n.language ='ru' or n.language = '') AND n.status = 1 ORDER BY created DESC LIMIT 0, 50 in /home/melisbek/public_html/akaevu/drupal/includes/database.mysql.inc on line 66.
what should i do?
and i wonder, if it depends on the node access patch to the taxonomy.module?
Comments
Comment #1
efeefe commentedGuess I'm having a similar problem when trying to moderate a post:
Comment #2
hisham commentedI'm having the same problem, anyone figured out a solution?
Comment #3
hisham commentedI think I figured it out.
For me, this error occurred only when I moderated using the 'admin' account (the first account created in your drupal setting). The 'admin' account does not have a role defined, so when nmoderation looks up the role of this account and its corresponding vote value, it doesn't find it. So what you get is an invalid sql statement because $value is empty.
So the solution is to moderate using any account but the default admin account.
Hope this helps,
Hisham
Comment #4
grohk commentedActually the correct way to fix this is to properly fill out the moderation matrix and check that all roles have values assigned to them. Please consult the readme.txt included with the module and let me know if this makes sense.
Comment #5
lambert-1 commentedNo, all the roles are assigned in the moderation matrix (step 4 in the Readme).
I tried logging in as a user with who was not admin but who had the right privileges.
This is the error I still get:
user error: 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 'DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmod
query: SELECT v.vote, nmuv.value, nmuv.uvid, DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmoderation_uservotes nmuv INNER JOIN node_access na ON na.nid = n.nid INNER JOIN nmoderation_votes v ON nmuv.mid = v.mid INNER JOIN node n ON nmuv.gid = n.nid AND nmuv.realm = 'node_nid' INNER JOIN users u ON nmuv.uid = u.uid WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','node_privacy_byrole_role4','node_privacy_byrole_user14')) AND n.status = 1 ORDER BY created DESC LIMIT 0, 50 in /home/lambert/public_html/civic2/includes/database.mysql.inc on line 66.
I am running Drupal 4.6 with the CivicSpace 0.8.1.2
Comment #6
scrow commentedI am also experiencing this error. I have done a fresh install of Drupal 4.6.3 and Nmoderation-4.6.0 and I've also tried the CVS version as well. It appears only when I navigate to "all node moderation votes".[code]user error: 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 'DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmod
query: SELECT v.vote, nmuv.value, nmuv.uvid, DISTINCT(n.nid), n.created, n.title, nmuv.uid, u.name FROM nmoderation_uservotes nmuv INNER JOIN node_access na ON na.nid = n.nid INNER JOIN nmoderation_votes v ON nmuv.mid = v.mid INNER JOIN node n ON nmuv.gid = n.nid AND nmuv.realm = 'node_nid' INNER JOIN users u ON nmuv.uid = u.uid WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','simple_access0')) AND n.status = 1 ORDER BY created DESC LIMIT 0, 50 in /var/www/scrow.com/htdocs/includes/database.mysql.inc on line 66.[/code]
I've tried populating the nmoderation matrix and using a account other than the first one created. Both of which had no effect on the error.
Comment #7
scrow commentedI just did another fresh install and the error dissapeared. I can't explain it but a couple notable things.
Without the nmoderation matrix populated there is no error.
Using the "first account" there is no error.
I suspect that I had a stale module from a previous install poluting my configuration. For the users still experiencing this error I would suggest wiping your modules directory and reloading them.
Comment #8
smilodon commentedNope, disabling / enabling all modules does not work...
Maybe erasing all the nodes and then installing this module works ?
Aniway... fresh install or doung that is not an option for me.
Does anyone have a better solution ?
Comment #9
thomherfs commentedI'm getting the same error on a CivicSpace 0.8.3RC5b install. I've tried using a different user to moderate (with permissions set, of course), and am still getting this "right syntax" MySQL error. Any fix in sight?
Comment #10
thomherfs commentedIs there a resolution to this issue? The support request/bug report seems to be an open issue since May of 2005 and is still causing problems in late February of 2006.
Is there a resolution to this issue that has been posted somewhere else and not referenced here? Can *someone* supply an answer to this problem--even if the answer is simply that there is no resolution? The module as supplied doesn't seem to work with the current stable Drupal and CivicSpace distros.
Comment #11
grohk commentedSorry about the slow responce thomherfs, but I have never been able to reproduce this bug. Perhaps you could post details about your config like the version of PHP you use and the options you have enabled? Also please list any other modules you have enabled.
Comment #12
eaton commentedThis should be fixed in the new 4.7 version of the module -- vote casting has been rewritten to use VotingAPI, and this error no longer occurs.
Comment #13
(not verified) commented