| View previous topic :: View next topic |
| Author |
Message |
Gameshark Lance Corporal

Joined: 29 Jul 2003 Posts: 8
|
Posted: Mon Aug 04, 2003 8:15 am Post subject: Couldn't update private forum permissions |
|
|
This error comes up everytime on one particular user whenever i try to let him moderate the forums in PHP nuke 6.5:
Couldn't update private forum permissions
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' 1)' at line 2
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (3, , 1)
Line : 385
FIle: /data/members/free/tripod/uk/t/h/e/theenclave/htdocs/modules/Forums/admin/admin_ug_auth.php
PLease help its annoying hes supposed to be a moderator but cant be.  |
|
| Back to top |
|
 |
|
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Mon Aug 04, 2003 11:12 am Post subject: |
|
|
Yes, it's a bug. If you try it on the mysql command line:
| Code: |
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (3, ,1);
|
you will get the same error. But if you try
| Code: |
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (3,"",1);
|
it will be O.K.
Diagnosis: This means that the group_id does not have any value, while it probably should.
Solution: Put that moderator in a group first.
Didn't try it, though. |
|
| Back to top |
|
 |
chatserv President


Joined: 19 Aug 2001 Posts: 3258
|
Posted: Mon Aug 04, 2003 2:23 pm Post subject: |
|
|
| Try replacing your admin_ug_auth.php file with this one. |
|
| Back to top |
|
 |
Gameshark Lance Corporal

Joined: 29 Jul 2003 Posts: 8
|
Posted: Mon Aug 04, 2003 3:17 pm Post subject: |
|
|
Thanks ill let you know if it works  |
|
| Back to top |
|
 |
Venum Corporal

Joined: 10 May 2003 Posts: 18 Location: USA
|
Posted: Sat Aug 30, 2003 10:09 am Post subject: Re: Couldn't update private forum permissions |
|
|
I downloaded and installed the file onto my phpnuke 6.9 site and it worked.
Thank you for this one...... |
|
| Back to top |
|
 |
yoyolai Corporal

Joined: 07 Apr 2002 Posts: 12
|
Posted: Wed Sep 10, 2003 5:56 am Post subject: |
|
|
hay it worked.
Cool... thanks so much..  |
|
| Back to top |
|
 |
Tiigeress Lance Corporal

Joined: 22 Oct 2003 Posts: 10
|
Posted: Thu Oct 23, 2003 2:06 am Post subject: |
|
|
Same thing is happening to me, only I tried both adding user to a group first, and switching admin_ug_auth.php with the one listed above, and still I get this error....
SQL Error : 1064 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 ' 1)' at line 2
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)
Line : 385
File : /modules/Forums/admin/admin_ug_auth.php
any ideas?
lines 354-357 admin_ug_auth.php
| Code: |
if ( $action == 'insert' )
{
$sql_field = '';
$sql_value = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . $auth_type;
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . $value;
}
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . 'auth_mod';
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "INSERT INTO " .AUTH_ACCESS_TABLE. " (forum_id, group_id, $sql_field)
VALUES ($forum_id, $group_id, $sql_value)";
}
else
{
$sql_values = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . $auth_type . ' = ' . $value;
}
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . 'auth_mod = ' . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET $sql_values
WHERE group_id = '$group_id'
AND forum_id = $forum_id";
}
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update private forum permissions", "", __LINE__, __FILE__, $sql);
}
}
}
|
|
|
| Back to top |
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Thu Oct 23, 2003 4:58 am Post subject: |
|
|
From the error
| Code: |
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)
|
and the code, I deduce that, for some reason I don't know, $group_id is still empty. This means that the group ID you have put the moderator into is still empty. Maybe deleting that group and recreating it could help. |
|
| Back to top |
|
 |
Tiigeress Lance Corporal

Joined: 22 Oct 2003 Posts: 10
|
Posted: Thu Oct 23, 2003 9:32 am Post subject: |
|
|
| deleting group didnt work. Would getting rid of everywhere it asks for group_id be any help? |
|
| Back to top |
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Thu Oct 23, 2003 4:44 pm Post subject: |
|
|
You still have to put that moderator into that group - did you do this after you recreated the group?
I don't think that deleting code is a viable solution to your problem. It will probably interfere with other code where group information is needed. |
|
| Back to top |
|
 |
Tiigeress Lance Corporal

Joined: 22 Oct 2003 Posts: 10
|
Posted: Thu Oct 23, 2003 7:21 pm Post subject: |
|
|
| yeah i tried all the fixes, then put the original files back in, and deleted group, added group again, and added moderator again at first as admin of the group, second removed him and tried adding him as a group member. and tried fixes again :/ |
|
| Back to top |
|
 |
unplug Lance Corporal

Joined: 28 Sep 2003 Posts: 9
|
Posted: Mon Oct 27, 2003 8:22 pm Post subject: |
|
|
| chatserv wrote: | | Try replacing your admin_ug_auth.php file with this one. |
I have replaced with that one but same error still found. Anyone can help? I am using phpnuke6.9. |
|
| Back to top |
|
 |
unplug Lance Corporal

Joined: 28 Sep 2003 Posts: 9
|
Posted: Sat Nov 01, 2003 8:05 am Post subject: |
|
|
| unplug wrote: | | chatserv wrote: | | Try replacing your admin_ug_auth.php file with this one. |
I have replaced with that one but same error still found. Anyone can help? I am using phpnuke6.9. |
Just check that the bug is fixed after replacing by the above php. However, there is another bug found. I have created a usergroup but none of the member can join that group. Anyone can help! |
|
| Back to top |
|
 |
Purus Private

Joined: 28 Feb 2004 Posts: 5
|
Posted: Sat Feb 28, 2004 12:12 pm Post subject: |
|
|
| chatserv wrote: | | Try replacing your admin_ug_auth.php file with this one. |
This worked very nicely and now I can set users as Admins, however, it doesn't seem to help when trying to set an Admin as a normal user. I get the same error as before.  |
|
| Back to top |
|
 |
messagedj Private

Joined: 25 Mar 2004 Posts: 1
|
Posted: Thu Mar 25, 2004 3:17 pm Post subject: |
|
|
Now... this was my problem, and my solution
i had the NSN Groups installed, and the PPBB2
i created a Group called "Gold Members" Now one of my Goldmembers needed to be a Mod at the Forum. everytime i tried to do that i got the same error. Even when i downloaded the files above.
Now, when i deleted him off the group and set his permissions to "Moderator" everything went okay.. then you add him back to the group again and you are all done.
good luck |
|
| Back to top |
|
 |
goldy Warrant Officer

Joined: 29 Mar 2002 Posts: 64 Location: SLOVENIA
|
Posted: Tue Apr 06, 2004 11:34 pm Post subject: It works now! |
|
|
| chatserv wrote: | | Try replacing your admin_ug_auth.php file with this one. |
Thx, chatserv. It works now, very fine....  |
|
| Back to top |
|
 |
vandalizer Private

Joined: 12 Nov 2004 Posts: 1 Location: Toronto
|
Posted: Fri Nov 12, 2004 10:28 pm Post subject: |
|
|
chatserv,
Thanks alot for the php file. I was having the same problem and it fixed it right up. |
|
| Back to top |
|
 |
552211 Private

Joined: 08 Mar 2005 Posts: 2
|
Posted: Tue Mar 08, 2005 8:10 am Post subject: chatserv is awesome! |
|
|
chatserv is awesome! ...
The file instantly fixed my problem too...
I'm on nuke7.0 with bb2 2.1 so I guess this problem was never fixed as new versions came out because chatserv's fix was posted back in 2003. |
|
| Back to top |
|
 |
Evaders99 President

Joined: 29 Jul 2003 Posts: 3077
|
Posted: Tue Mar 08, 2005 12:40 pm Post subject: |
|
|
| I'm pretty sure this fixed in all the latest Patched files - http://www.nukefixes.com |
|
| Back to top |
|
 |
alden22 Private

Joined: 14 Oct 2009 Posts: 1
|
Posted: Wed Oct 14, 2009 9:40 pm Post subject: |
|
|
| Great help and very useful information. I am doing cisco certification and its going well. But i have learned a lot from hp certification and its professional experience. |
|
| Back to top |
|
 |
|
|
 |
|