MyBB Community Forums

Full Version: [F] Unable to set permissions for forum. [C-Michael83]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I went to open up a localhost forum for guest user posting to test something and discovered that I am unable to set permissions for guests. A MySQL query fails.

Steps to reproduce (default 1.4 out-of-the-box forum):

1) Admin CP -> Forums & Posts -> "My Forum" -> Permissions tab.
2) Check "Can post threads?" and "Can post replies?" for the Guests group.
3) Click "Save Forum Permissions".

Expected result: The permissions get saved to the database.

Actual result: The following MySQL error:

Quote:MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1264 - Out of range value adjusted for column 'canviewthreads' at row 1

Query:
INSERT INTO mybb_forumpermissions (fid,gid,canview,canviewthreads,candlattachments,canpostthreads,canpostreplys,canpostattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canpostpolls,canvotepolls,cansearch) VALUES ('2','1','1','','','1','1','0','','','','','','0','','')

Please contact the MyBB Group for support.


System setup:

PHP 5.2.6
MySQL 5.0.27
Apache 2.x (I don't recall what version but PHP is running as a module)
MyBB 1.4.2
Internet Explorer 6/Firefox 3


I found this post:

http://community.mybboard.net/thread-38309.html

But the solutions provided are not viable.

WORKAROUND

I found a workaround to this problem - click the 'Set/Edit Permissions' link at the very right of the group's row. Then, select 'Custom' and edit away. Submitting this particular form works.
Cannot reproduce on 1.4.2, so maybe something got fixed by 1.4.2??
(2008-10-13, 01:04 AM)thruska Wrote: [ -> ]I went to open up a localhost forum for guest user posting to test something and discovered that I am unable to set permissions for guests. A MySQL query fails.

Steps to reproduce (default 1.4 out-of-the-box forum):

1) Admin CP -> Forums & Posts -> "My Forum" -> Permissions tab.
2) Check "Can post threads?" and "Can post replies?" for the Guests group.
3) Click "Save Forum Permissions".

Expected result: The permissions get saved to the database.

Actual result: The following MySQL error:

Quote:MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1264 - Out of range value adjusted for column 'canviewthreads' at row 1

Query:
INSERT INTO mybb_forumpermissions (fid,gid,canview,canviewthreads,candlattachments,canpostthreads,canpostreplys,canpostattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canpostpolls,canvotepolls,cansearch) VALUES ('2','1','1','','','1','1','0','','','','','','0','','')

Please contact the MyBB Group for support.


System setup:

PHP 5.2.6
MySQL 5.0.27
Apache 2.x (I don't recall what version but PHP is running as a module)
MyBB 1.4.2
Internet Explorer 6/Firefox 3


I found this post:

http://community.mybboard.net/thread-38309.html

But the solutions provided are not viable.

WORKAROUND

I found a workaround to this problem - click the 'Set/Edit Permissions' link at the very right of the group's row. Then, select 'Custom' and edit away. Submitting this particular form works.

(2008-10-13, 10:11 AM)Matt_ Wrote: [ -> ]Cannot reproduce on 1.4.2, so maybe something got fixed by 1.4.2??

Well it might not be as this only happens if you have the strict version of MySQL. Try turning on mysql and try again and see if you have the problem then.
I have 1.4.2. The servers (Apache/MySQL) sit on a Windows box. A default MySQL install is configured to be more strict in some cases (stuff like this) and more lax in others (e.g. case-insensitivity) on Windows machines.
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group