MyBB Community Forums

Full Version: Error on registeration and and adding a forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey!
My forum was working fine until yesterday when I got this error message on registeration:

1364 - Field 'default_tab' doesn't have a default value


MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1364 - Field 'default_tab' doesn't have a default value
Query:
INSERT INTO venomusers (username,password,salt,loginkey,email,postnum,threadnum,avatar,avatartype,usergroup,additionalgroups,displaygroup,usertitle,regdate,lastactive,lastvisit,website,icq,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,lastip,language,showcodebuttons,sourceeditor,buddyrequestspm,buddyrequestsauto,away,awaydate,returndate,awayreason,referrer,referrals,buddylist,ignorelist,pmfolders,notepad,warningpoints,moderateposts,moderationtime,suspendposting,suspensiontime,coppauser,classicpostbit,usernotes,dst,avatardimensions,ougc_awards) VALUES


Can anyone please guide me to the solution?
Thanks in advance.
quick methode: execute the following query in your sql interface (phpmyadmin): ALTER TABLE venomusers ALTER COLUMN default_tab TEXT NULL
As this plugin uses a TEXT field, it's impossible to add a default value, so you have to allow null in it. Note that's a fix which can create bugs.

A better way should be to change the type of field: it contains an id, so modify the plugin:
the line 116 ($db->add_column('users', 'default_tab', 'TEXT NOT NULL');) must become:
$db->add_column('users', 'default_tab', "VARCHAR(255) NOT NULL DEFAULT ''");
And you can uninstall/reinstall the plugin, or directly alter the DB:
ALTER TABLE venomusers ALTER COLUMN default_tab VARCHAR(255) NOT NULL DEFAULT ''
Hey thanks for the response.
Ok But which plugin has to be modified here?
If you can elaborate a bit then it would be helpful for me.

Thanks in advance.
The plugin is MyTabs - Tabbed Forum Browsing

A little rule to help you: when you install a plugin, recheck all your forum (including registration) to validate it, and then install the following. Like this, if a plugin generates a bug, you know it's the last one you installed.