MyBB Community Forums

Full Version: Error when installing Account switcher
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello I keep getting this error when I install the Enhanced Account Switcher on my site.

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

SQL Error:1366 - Incorrect integer value: 'NULL' for column 'tid' at row 1Query:INSERT INTO mybb_templates (tid,title,template,sid,version,dateline) VALUES ('NULL','accountswitcher_accountlist','<html>\n <head>\n <title>{$settings[\'bbname\']} - {$lang->aj_accountlist}</title>\n {$headerinclude}\n </head>\n <body>\n {$header}\n <table border=\"0\" cellspacing=\"{$theme[\'borderwidth\']}\" cellpadding=\"{$theme[\'tablespace\']}\" class=\"tborder\">\n <tr>\n <td class=\"thead\" {$colspan_head}><strong>{$lang->aj_accountlist}</strong></td>\n </tr>\n <tr>\n <td class=\"trow1\" style=\"padding-left:30px;\">\n <strong>{$lang->aj_masteraccount}</strong>\n </td>\n {$profile_head}\n <td class=\"trow1\" style=\"padding-left:30px;\">\n <strong>{$lang->aj_profile}</strong>\n </td>\n {$profile_head}\n </tr>\n {$accountlist_masterbit}\n </table>\n {$multipage}\n {$footer}\n </body>\n </html>',-2,2008,1452520252)

How do I get around this?
you can replace all occurrences of NULL with 0 (zero) in the plugin file
(use editor like notepad++ for editing php files & save with utf8 encoding without BoM)
(2016-01-11, 02:01 PM).m. Wrote: [ -> ]you can replace all occurrences of NULL with 0 (zero) in the plugin file
(use editor like notepad++ for editing php files & save with utf8 encoding without BoM)

Did that and got this error now.

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

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 '0 DEFAULT "0"' at line 1
Query:
ALTER TABLE mybb_users ADD as_uid INT(11) NOT 0 DEFAULT "0"
^ oh! NOT 0 should be replaced by NOT NULL at all occurrences
(2016-01-11, 02:54 PM).m. Wrote: [ -> ]^ oh! NOT 0 should be replaced by NOT NULL at all occurrences

Got the first error again x_x

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

SQL Error:1366 - Incorrect integer value: 'NULL' for column 'tid' at row 1Query:INSERT INTO mybb_templates (tid,title,template,sid,version,dateline) VALUES ('NULL','accountswitcher_accountlist','<html>\n <head>\n <title>{$settings[\'bbname\']} - {$lang->aj_accountlist}</title>\n {$headerinclude}\n </head>\n <body>\n {$header}\n <table border=\"0\" cellspacing=\"{$theme[\'borderwidth\']}\" cellpadding=\"{$theme[\'tablespace\']}\" class=\"tborder\">\n <tr>\n <td class=\"thead\" {$colspan_head}><strong>{$lang->aj_accountlist}</strong></td>\n </tr>\n <tr>\n <td class=\"trow1\" style=\"padding-left:30px;\">\n <strong>{$lang->aj_masteraccount}</strong>\n </td>\n {$profile_head}\n <td class=\"trow1\" style=\"padding-left:30px;\">\n <strong>{$lang->aj_profile}</strong>\n </td>\n {$profile_head}\n </tr>\n {$accountlist_masterbit}\n </table>\n {$multipage}\n {$footer}\n </body>\n </html>',-2,2008,1452525772)
Have you already tried the newest version from the authors website?
"tid" 		=> "NULL",

"NULL" can be replaced by "0"

better solution can be to contact your web host and ask to turn off strict mode of SQL server
Alright it installs an activates alright.

But when some one tries to register or create a new member via the acp while it is installed and activated it displays this error.

Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1364 - Field 'as_secreason' doesn't have a default value
Query:
INSERT INTO mybb_users (username,password,salt,loginkey,email,postnum,threadnum,avatar,avatartype,usergroup,additionalgroups,displaygroup,usertitle,regdate,lastactive,lastvisit,website,icq,aim,yahoo,skype,google,birthday,signature,allownotices,hideemail,subscriptionmethod,receivepms,receivefrombuddy,pmnotice,pmnotify,showimages,showvideos,showsigs,showavatars,showquickreply,showredirect,tpp,ppp,invisible,style,timezone,dstcorrection,threadmode,daysprune,dateformat,timeformat,regip,language,showcodebuttons,sourceeditor,buddyrequestspm,buddyrequestsauto,away,awaydate,returndate,awayreason,notepad,referrer,referrals,buddylist,ignorelist,pmfolders,warningpoints,moderateposts,moderationtime,suspendposting,suspensiontime,coppauser,classicpostbit,usernotes,dst) VALUES ('Morgan Stilinski','3e9059614bb337b176fc049c77d0b33c','WEn02v9m','aF4yDlKlqf4ce6Wsz5VjCavLb4HmQ8GxuMnmYtR0Z7sDQvj7w1','[email protected]',0,0,'','',2,'',0,'',1452594019,1452594019,1452594019,'',0,'','','','','','',1,0,0,1,0,1,1,1,1,1,1,1,1,0,0,0,0,'',0,'linear',0,'','',X'','',1,0,1,0,0,0,0,'','',0,0,'','','',0,0,0,0,0,0,0,'',0)
file : as_install.php ; line : 97
$db->add_column('users', 'as_secreason', 'TEXT NOT NULL');

it can be changed to
$db->add_column('users', 'as_secreason', 'TEXT NOT NULL DEFAULT ""');
Did that now I get this error

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

SQL Error:
1101 - BLOB/TEXT column 'as_secreason' can't have a default value
Query:
ALTER TABLE mybb_users ADD as_secreason TEXT NOT NULL DEFAULT ""
Pages: 1 2