Fixed Member Roles Snafu

CamP

New Member
When I attempt to create a new Member Roles (as there are none). I get the following error:
Mysqli statement execute error : Field 'member_role_title' doesn't have a default value

So I went into the database and set 'member_role_title' to have a default value of 'NULL'. I was able to create the new Member Role.

The next issue I'm having is assigning the Member Role to the user who creates a group. It appears to not be doing that. Any ideas on how to resolve this issue?

-- NOTE --
Xenforo 1.5.6
Social Addon 2.5.1

Tested on PHP 5.4, 5.6 and 7
Tested on MySQL 5.5 and 5.7
 
Last edited:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'member_role_title' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214

Stack Trace

#0 /***/public/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /***/public/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)

#2 /***/public/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /***/public/library/XenForo/DataWriter.php(1638): Zend_Db_Adapter_Abstract->insert('xf_team_member_...', Array)
#4 /***/public/library/XenForo/DataWriter.php(1627): XenForo_DataWriter->_insert()
#5 /***/public/library/XenForo/DataWriter.php(1419): XenForo_DataWriter->_save()
#6 /***/public/library/Nobita/Teams/ControllerAdmin/MemberRole.php(93): XenForo_DataWriter->save()
#7 /***/public/library/XenForo/FrontController.php(351): Nobita_Teams_ControllerAdmin_MemberRole->actionSave()
#8 /***/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /***/public/admin.php(13): XenForo_FrontController->run()
#10 {main}



Request State



array(3) {
....["url"] => string(59) "https://www.***.com/admin.php?team-member-roles/save"

....["_GET"] => array(1) {
........
["team-member-roles/save"] => string(0) ""
....
}
....
["_POST"] => array(7) {
........
["member_role_id"] => string(11) "team_leader"
........
["member_role_title"] => string(11) "Team Leader"
........
["display_order"] => string(2) "10"
........
["_xfToken"] => string(8) "********"
........
["_xfRequestUri"] => string(32) "/admin.php?team-member-roles/add"
........
["_xfNoRedirect"] => string(1) "1"
........
["_xfResponseType"] => string(4) "json"
....}

}


 
Look like i not complete remove that field. Just go to your database then this query:

Code:
alter table xf_team_member_role drop column member_role_title
 
Back
Top