MyBB Community Forums

Full Version: MySQL error on plugin installation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I was searching for how to limit guests from browsing threads and I got answers from some users in my previous thread, 

https://community.mybb.com/thread-237298.html

And when I decided to install them on the forum, I start getting this error, any way to fix it please  Exclamation Exclamation


When I try to activate this plugin I get this error : https://community.mybb.com/mods.php?acti...w&pid=1180


MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'NULL' for column 'gid' at row 1
Query:
INSERT INTO mybb_settinggroups (`gid`,`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('NULL','guestaccess','Guest Access','Thread Viewing Limits For Guests','1','no')


Thanks in advance!
Open the inc/plugins/guestaccess.php file and remove the following lines:
#34 : "gid" => "NULL",
#47 : "sid" => "NULL",
#58 : "sid" => "NULL",
#68 : "sid" => "NULL",
(2023-01-05, 12:44 PM)Crazycat Wrote: [ -> ]Open the inc/plugins/guestaccess.php file and remove the following lines:
#34 : "gid" => "NULL",
#47 : "sid" => "NULL",
#58 : "sid" => "NULL",
#68 : "sid" => "NULL",

still error 

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'no' for column 'isdefault' at row 1
Query:
INSERT INTO mybb_settinggroups (`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('guestaccess','Guest Access','Thread Viewing Limits For Guests','1','no')
(2023-01-05, 03:54 PM)expertful Wrote: [ -> ]still error 

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'no' for column 'isdefault' at row 1
Query:
INSERT INTO mybb_settinggroups (`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('guestaccess','Guest Access','Thread Viewing Limits For Guests','1','no')

Search in plugin file for:
'isdefault' => 'no',

Replace is with:
'isdefault' => 0,
(2023-01-05, 04:08 PM)SvePu Wrote: [ -> ]
(2023-01-05, 03:54 PM)expertful Wrote: [ -> ]still error 

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'no' for column 'isdefault' at row 1
Query:
INSERT INTO mybb_settinggroups (`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('guestaccess','Guest Access','Thread Viewing Limits For Guests','1','no')

Search in plugin file for:
'isdefault' => 'no',

Replace is with:
'isdefault' => 0,

Thankyou very much, this worked now! Can you help me fix this too :- https://community.mybb.com/thread-237347.html