Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I installed the 5.x build into my copy of Drupal 5.1. It appears to work fine, BUT when I change the permission settings on any item I get this:
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (1,21,,,,0,0) in /home/httpd/vhosts/thepeatgroup.com/httpdocs/vli/includes/database.mysql.inc on line 172.
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access (tid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (3,21,,,,0,0) in /home/httpd/vhosts/thepeatgroup.com/httpdocs/vli/includes/database.mysql.inc on line 172.
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (2,21,,,,0,0) in /home/httpd/vhosts/thepeatgroup.com/httpdocs/vli/includes/database.mysql.inc on line 172.
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access (tid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (4,21,,,,0,0) in /home/httpd/vhosts/thepeatgroup.com/httpdocs/vli/includes/database.mysql.inc on line 172.
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (3,21,,,,0,0) in /home/httpd/vhosts/thepeatgroup.com/httpdocs/vli/includes/database.mysql.inc on line 172.
any ideas?
Comment | File | Size | Author |
---|---|---|---|
#19 | taxonomy_access_admin.inc-permfix-drupal-4.txt | 1.58 KB | zonker |
Comments
Comment #1
chazoopa CreditAttribution: chazoopa commentedI get the same error...... Watching this post.
Drupal 5.1
5.x build of taxonomy_access
MySQL database 3.23.58
PHP 4.3.11
Comment #2
keve CreditAttribution: keve commentedCommited to both HEAD and 5.x
Comment #3
brianpeat CreditAttribution: brianpeat commentedso for a newbie, what exactly does "committed" mean?
Comment #4
keve CreditAttribution: keve commentedI "uploaded" the corrected version to DRUPAL-5.x. So that you can download the new tarball from the TAC project page.
Comment #5
chazoopa CreditAttribution: chazoopa commentedI have just downloaded & installed the fix, but still get the same error.
user warning: You have an error in your SQL syntax near ',,0,0)' at line 1 query: INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (4,2,,,,0,0) in /xxxx/xxxx/xxxx/includes/database.mysql.inc on line 172.
Any further ideas?
Comment #6
brianpeat CreditAttribution: brianpeat commenteddid you use the update.php page and update the module? I did (not sure if that helped or not, but I chose the highest number) and I no longer get errors.
Comment #7
keve CreditAttribution: keve commentedChazoopa: Check if the version number inside taxonomy_access_admin.inc is v 1.9.2.1. That is the latest version for Drupal 5.x
Comment #8
wmostrey CreditAttribution: wmostrey commentedI had this error too and can confirm that all is ok with the new version. Thanks!
Comment #9
chazoopa CreditAttribution: chazoopa commentedKeve, I have v 1.9.2.1. Could I have messed up the db update? Should I choose a different update 1, 2, 3 or 4?
FYI, when I did the update, I removed all exiting files before I put on the new files you released.
Comment #10
keve CreditAttribution: keve commentedNo update needed: #1-4 makes database updates, an it has not changed since 4,7.x
I will recheck it, but on my system it works.
Can you check on permission page:
- Does any radio form is checked (I,A,D)? Or are they empty?
If you fill out every radio form, then at submission does this error occur? After this, when you reopen same page, does any radio form is checked?
Comment #11
Andreas Wolf CreditAttribution: Andreas Wolf commentedThe error is gone for me with taxonomy_access_admin.inc 1.9.2.1.
The main problem was that this version is NOT part of the tarball mentioned under #4 (taxonomy_access-5.x-1.x-dev.tar.gz).
I had to download this file from CVS.
Comment #12
wmostrey CreditAttribution: wmostrey commentedNot sure I agree with you Andreas. I downloaded taxonomy_access-5.x-1.x-dev.tar.gz and that fixed this issue for me.
Comment #13
Jürgen Depicker CreditAttribution: Jürgen Depicker commentedI'm getting the same errors, using version DRUPAL-4-7 from cvs (eclipse dev environment).
I believe I'm not supposed to use the HEAD version, when my Drupal is 4-7-6 , or can I? Please help me out.
* 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 ',,0,0)' at line 1 query: taxonomy_access_defaults_update INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (9,2,,,,0,0) in /var/www/includes/database.mysql.inc on line 121.
* 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 ',,0,0)' at line 1 query: taxonomy_access_defaults_update INSERT INTO term_access_defaults (vid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (8,2, , , ,0,0) in /var/www/includes/database.mysql.inc on line 121.
Comment #14
Jürgen Depicker CreditAttribution: Jürgen Depicker commentedI've just merged the four lines with the '? :' construct, to provide for '0' when not set in the INSERT statement, and all works now. But my question remains: my site uses drupal-4-7 versions from CVS, so how could I have updated properly this module to make it work? Is using HEAD allowed or will it break my site?
Comment #15
keve CreditAttribution: keve commentedJürgen, can you provide a patch?
You can use cvs (in the TAC directory):
cvs up -r DRUPAL-4-7
HEAD is intended for 5.x at the moment or later for 6.x.
Comment #16
mondo_bongo CreditAttribution: mondo_bongo commentedI'm having the same issues, and I am running 4.7.6
I have a test site on the same server that is not having the problem. I test the modules on the test site, then copy them to the production site. The production site was just built last week; the test site is about a month old.
The errors on the production site occur as soon as I click "submit". The changes appear to take.
I have the same problem with the new CVS, too.
Many thanks.
Comment #17
keve CreditAttribution: keve commentedI change version for this issue, since i consider this fixed for 5.x.
Comment #18
Jürgen Depicker CreditAttribution: Jürgen Depicker commentedRe: keve
Sorry, keve, I didn't really find out yet how to do that using Eclipse. I'll find out this week I hope ;-) and post a patch here.
Comment #19
zonker CreditAttribution: zonker commentedPlease see attached patch for DRUPAL-4-7.
-nick
Comment #20
keve CreditAttribution: keve commentedThanks zonker for the patch. I commited it to 4.7.x. :)
(Sorry, i could not fix this earlier, thought i also commited this change to both 5.x and 4.7.x)
Comment #21
keve CreditAttribution: keve commentedThanks zonker for the patch. I commited it to 4.7.x. :)
(Sorry, i could not fix this earlier, thought i also commited this change to both 5.x and 4.7.x)
Comment #22
(not verified) CreditAttribution: commentedComment #23
juanval CreditAttribution: juanval commentedI still having problems with inserts when saving role permissions. I use PHP 5.2.1 and MySQL 5.0.26. Seems that inserts with the form "INSERT INTO (field1, field2, field3, field4, field5) VALUES (value1,,,,value5)" are not supported on mysql5, returning errors like this:
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 ',,,)' at line 1 query: INSERT INTO term_access (tid,rid,grant_view,grant_update,grant_delete,grant_create,grant_list) VALUES (54,3,,,,,) in
After reading INSERT syntax on mysql documentation site, seems that the correct SQL is: "INSERT INTO (field1, field2, field3, field4, field5) VALUES (value1,DEFAULT,DEFAULT,DEFAULT,value5)"
Any suggestions/fixes please? We have down by this problem a hosting server with more than 100 drupal sites after an update to PHP 5.2 and MySQL 5.0.26.
Comment #24
juanval CreditAttribution: juanval commentedSorry, in the previous comment I forgot to say that we use drupal 4.7.4 and latest version o taxonomy_access. Also, we tried to migrate to 5.1 and problem persists.
Comment #25
juanval CreditAttribution: juanval commentedSolved.
By mistake we have activated suhosin hardended php module. Once deactivated, the problem disappeared. Seems, that suhosin modifies in some manner form variables used by taxonomy access.
Comment #26
(not verified) CreditAttribution: commented