XF 2.0 Error adding node - MySQL query error [1364]: Field 'rules' doesn't have a default value

TC44

Member
I'm getting this error when trying to create a forum node. This was after installing a couple of addons that I've since disabled.

Would greatly appreciate any suggestions on how to resolve, thanks!

Oops! We ran into some problems.
XF\Db\Exception: MySQL query error [1364]: Field 'rules' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 212

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 174
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 70
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 69
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 146
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1381
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1113
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/Entity/Entity.php at line 1131
  8. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
  9. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 159
  10. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/AbstractNode.php at line 110
  11. XF\Admin\Controller\AbstractNode->actionSave() in src/XF/Mvc/Dispatcher.php at line 249
  12. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1879
  15. XF\App->run() in src/XF.php at line 328
  16. XF::runApp() in admin.php at line 13
 
This was after installing a couple of addons that I've since disabled.
Disabling the add-on is the cause of the problem - it hasn't been coded correctly so when disabled, causes an error.

Re-enable the add-on or better yet, contact the author and get them to issue a fix.
 
Even worse than that, it appears as though they've added a table called "rules" to one of the core node related tables. Although adding new columns to core tables is fine, we do at least ask that they are prefixed with the add-on or developer name to aid in identification and ensure that should we ever add a column of the same name, there won't be a clash.
 
I have the same problem

XF\Db\Exception: MySQL query error [1364]: Field 'avatar_frame_enable' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 79
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 220
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1521
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1253
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 71
  8. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 189
  9. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/UserGroup.php at line 119
  10. XF\Admin\Controller\UserGroup->actionSave() in src/XF/Mvc/Dispatcher.php at line 352
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  15. XF\App->run() in src/XF.php at line 524
  16. XF::runApp() in admin.php at line 13
 
I have the same problem
Have you recently added any add-ons that have interaction with the avatars? If so, try disabling them.
It's not surprising that many add-ons fail to follow basic XF functionality requirements when so much extension is dependent upon those third parties and lacking in the core script.
 
Have you recently added any add-ons that have interaction with the avatars? If so, try disabling them.
It's not surprising that many add-ons fail to follow basic XF functionality requirements when so much extension is dependent upon those third parties and lacking in the core script.
I deleted one add-on - Avatar on Registration but didn t help ..... Problem is I cannot add new User Group.
 
There is automatic respons what to do - but I don t know where find all this folders and datas

rray(4) {
["url"] => string(29) "/admin.php?user-groups/0/save"
["referrer"] => string(51) "http://krscanskiforum.net/admin.php?user-groups/add"
["_GET"] => array(1) {
["user-groups/0/save"] => string(0) ""
}
["_POST"] => array(11) {
["_xfToken"] => string(8) "********"
["title"] => string(9) "Messianic"
["display_style_priority"] => string(1) "0"
["user_title_override"] => string(1) "0"
["username_css"] => string(0) ""
["banner_text"] => string(9) "Messianic"
["banner_css_class"] => string(30) "userBanner userBanner--primary"
["permissions"] => array(23) {
["general"] => array(32) {
["view"] => string(5) "unset"
["viewNode"] => string(5) "unset"
["viewMemberList"] => string(5) "unset"
["viewProfile"] => string(5) "unset"
["usePush"] => string(5) "unset"
["maxMentionedUsers"] => string(1) "0"
["search"] => string(5) "unset"
["createTag"] => string(5) "unset"
["bypassUserTagLimit"] => string(5) "unset"
["editProfile"] => string(5) "unset"
["editCustomTitle"] => string(5) "unset"
["requireTfa"] => string(5) "unset"
["changeUsername"] => string(5) "unset"
["changeUsernameNoApproval"] => string(5) "unset"
["submitWithoutApproval"] => string(5) "unset"
["bypassFloodCheck"] => string(5) "unset"
["bypassSpamCheck"] => string(5) "unset"
["bypassNofollowLinks"] => string(5) "unset"
["report"] => string(5) "unset"
["useContactForm"] => string(5) "unset"
["viewIps"] => string(5) "unset"
["bypassUserPrivacy"] => string(5) "unset"
["cleanSpam"] => string(5) "unset"
["viewWarning"] => string(5) "unset"
["warn"] => string(5) "unset"
["manageWarning"] => string(5) "unset"
["editBasicProfile"] => string(5) "unset"
["approveRejectUser"] => string(5) "unset"
["approveUsernameChange"] => string(5) "unset"
["banUser"] => string(5) "unset"
["canUseLau"] => string(5) "unset"
["editSignature"] => string(5) "unset"
}
["avatar"] => array(1) {
["allowed"] => string(5) "unset"
}
["profileBanner"] => array(1) {
["allowed"] => string(5) "unset"
}
["bookmark"] => array(2) {
["view"] => string(5) "unset"
["create"] => string(5) "unset"
}
["forum"] => array(54) {
["viewOthers"] => string(5) "unset"
["viewContent"] => string(5) "unset"
["react"] => string(5) "unset"
["contentVote"] => string(5) "unset"
["markSolution"] => string(5) "unset"
["postThread"] => string(5) "unset"
["postReply"] => string(5) "unset"
["deleteOwnPost"] => string(5) "unset"
["editOwnPost"] => string(5) "unset"
["editOwnPostTimeLimit"] => string(1) "0"
["editOwnThreadTitle"] => string(5) "unset"
["deleteOwnThread"] => string(5) "unset"
["viewAttachment"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["uploadVideo"] => string(5) "unset"
["tagOwnThread"] => string(5) "unset"
["tagAnyThread"] => string(5) "unset"
["manageOthersTagsOwnThread"] => string(5) "unset"
["votePoll"] => string(5) "unset"
["ozzmodz_poll_perms"] => string(5) "unset"
["inlineMod"] => string(5) "unset"
["stickUnstickThread"] => string(5) "unset"
["lockUnlockThread"] => string(5) "unset"
["manageAnyThread"] => string(5) "unset"
["deleteAnyThread"] => string(5) "unset"
["hardDeleteAnyThread"] => string(5) "unset"
["threadReplyBan"] => string(5) "unset"
["editAnyPost"] => string(5) "unset"
["deleteAnyPost"] => string(5) "unset"
["hardDeleteAnyPost"] => string(5) "unset"
["warn"] => string(5) "unset"
["manageAnyTag"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["undelete"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["markSolutionAnyThread"] => string(5) "unset"
["minDaysCreateNewThread"] => string(1) "0"
["minDaysViewForum"] => string(1) "0"
["minDaysViewThread"] => string(1) "0"
["minPostsViewForum"] => string(1) "0"
["minPostsThreadContent"] => string(1) "0"
["minPostsCreateThread"] => string(1) "0"
["minPostsReplyThreads"] => string(1) "0"
["minPostsSeeAttachments"] => string(1) "0"
["minPostsViewLinks"] => string(1) "0"
["minPostsViewImages"] => string(1) "0"
["minPostsVotePolls"] => string(1) "0"
["minPostsAddLinksThread"] => string(1) "0"
["minPostsAddLinksThreadRep"] => string(1) "0"
["threadsSeeWithout"] => string(1) "0"
["minPostsUseReport"] => string(1) "0"
["uploadAttachPostGuest"] => string(5) "unset"
["uploadVideoPostGuest"] => string(5) "unset"
}
["conversation"] => array(10) {
["start"] => string(5) "unset"
["receive"] => string(5) "unset"
["react"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["uploadVideo"] => string(5) "unset"
["editOwnMessage"] => string(5) "unset"
["editOwnMessageTimeLimit"] => string(1) "0"
["maxRecipients"] => string(1) "0"
["editAnyMessage"] => string(5) "unset"
["alwaysInvite"] => string(5) "unset"
}
["signature"] => array(14) {
["basicText"] => string(5) "unset"
["extendedText"] => string(5) "unset"
["align"] => string(5) "unset"
["list"] => string(5) "unset"
["image"] => string(5) "unset"
["link"] => string(5) "unset"
["media"] => string(5) "unset"
["block"] => string(5) "unset"
["maxPrintable"] => string(1) "0"
["maxLines"] => string(1) "0"
["maxLinks"] => string(1) "0"
["maxImages"] => string(1) "0"
["maxSmilies"] => string(1) "0"
["maxTextSize"] => string(1) "0"
}
["xtrReputation"] => array(1) {
["viewLevel"] => string(5) "unset"
}
["profilePost"] => array(19) {
["view"] => string(5) "unset"
["react"] => string(5) "unset"
["manageOwn"] => string(5) "unset"
["post"] => string(5) "unset"
["comment"] => string(5) "unset"
["deleteOwn"] => string(5) "unset"
["editOwn"] => string(5) "unset"
["viewAttachment"] => string(5) "unset"
["uploadAttachment"] => string(5) "unset"
["uploadVideo"] => string(5) "unset"
["inlineMod"] => string(5) "unset"
["editAny"] => string(5) "unset"
["deleteAny"] => string(5) "unset"
["hardDeleteAny"] => string(5) "unset"
["warn"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["undelete"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
}
["xfmg"] => array(78) {
["view"] => string(5) "unset"
["add"] => string(5) "unset"
["addWithoutApproval"] => string(5) "unset"
["deleteOwn"] => string(5) "unset"
["editOwn"] => string(5) "unset"
["editOwnMediaTimeLimit"] => string(1) "0"
["moveOwn"] => string(5) "unset"
["react"] => string(5) "unset"
["rate"] => string(5) "unset"
["tagOwnMedia"] => string(5) "unset"
["tagAnyMedia"] => string(5) "unset"
["manageOthersTagsOwnMedia"] => string(5) "unset"
["addWithoutWatermark"] => string(5) "unset"
["watermarkOwn"] => string(5) "unset"
["inlineMod"] => string(5) "unset"
["viewDeleted"] => string(5) "unset"
["viewModerated"] => string(5) "unset"
["undelete"] => string(5) "unset"
["approveUnapprove"] => string(5) "unset"
["deleteAny"] => string(5) "unset"
["hardDeleteAny"] => string(5) "unset"
["editAny"] => string(5) "unset"
["moveAny"] => string(5) "unset"
["manageAnyTag"] => string(5) "unset"
["warn"] => string(5) "unset"
["watermarkAny"] => string(5) "unset"
["createAlbum"] => string(5) "unset"
["addImage"] => string(5) "unset"
["addVideo"] => string(5) "unset"
["addAudio"] => string(5) "unset"
["addEmbed"] => string(5) "unset"
["deleteOwnAlbum"] => string(5) "unset"
["editOwnAlbum"] => string(5) "unset"
["editOwnAlbumTimeLimit"] => string(1) "0"
["moveOwnAlbum"] => string(5) "unset"
["changePrivacyOwnAlbum"] => string(5) "unset"
["reactAlbum"] => string(5) "unset"
["rateAlbum"] => string(5) "unset"
["bypassPrivacy"] => string(5) "unset"
["inlineModAlbum"] => string(5) "unset"
["viewDeletedAlbums"] => string(5) "unset"
["viewModeratedAlbums"] => string(5) "unset"
["undeleteAlbum"] => string(5) "unset"
["approveUnapproveAlbum"] => string(5) "unset"
["deleteAnyAlbum"] => string(5) "unset"
["hardDeleteAnyAlbum"] => string(5) "unset"
["editAnyAlbum"] => string(5) "unset"
["moveAnyAlbum"] => string(5) "unset"
["changePrivacyAnyAlbum"] => string(5) "unset"
["warnAlbum"] => string(5) "unset"
["viewComments"] => string(5) "unset"
["addComment"] => string(5) "unset"
["deleteComment"] => string(5) "unset"
["editComment"] => string(5) "unset"
["editOwnCommentTimeLimit"] => string(1) "0"
["reactComment"] => string(5) "unset"
["inlineModComment"] => string(5) "unset"
["viewDeletedComments"] => string(5) "unset"
["viewModeratedComments"] => string(5) "unset"
["undeleteComment"] => string(5) "unset"
["approveUnapproveComment"] => string(5) "unset"
["deleteAnyComment"] => string(5) "unset"
["hardDeleteAnyComment"] => string(5) "unset"
["editAnyComment"] => string(5) "unset"
["warnComment"] => string(5) "unset"
["viewNote"] => string(5) "unset"
["tagSelf"] => string(5) "unset"
["addNoteOwn"] => string(5) "unset"
["addNoteAny"] => string(5) "unset"
["deleteTagSelf"] => string(5) "unset"
["deleteOwnNote"] => string(5) "unset"
["viewPendingNote"] => string(5) "unset"
["editNoteAny"] => string(5) "unset"
["deleteAnyNote"] => string(5) "unset"
["tagWithoutApproval"] => string(5) "unset"
["maxFileSize"] => string(1) "0"
["maxImageWidth"] => string(1) "0"
["maxImageHeight"] => string(1) "0"
}
["xfmgStorage"] => array(1) {
["maxAllowedStorage"] => string(1) "0"
}
["MostEverOnline"] => array(4) {
["Total"] => string(5) "unset"
["Member_Totals"] => string(5) "unset"
["Guest_Totals"] => string(5) "unset"
["Hide_Widget"] => string(5) "unset"
}
["xcAdvancedPermissionsGene"] => array(5) {
["minPostsAddLinksSignature"] => string(1) "0"
["minPostsNewProfilePost"] => string(1) "0"
["minPostsCommentProfilePos"] => string(1) "0"
["minPostsAddLinksProfile"] => string(1) "0"
["minPostsHideStatusOnline"] => string(1) "0"
}
["xcAdvancedPermissionsConv"] => array(3) {
["minPostsCreateConv"] => string(1) "0"
["minPostsAddLinksConv"] => string(1) "0"
["minPostsStartConvStaff"] => string(1) "0"
}
["siropuEasyUserBan"] => array(6) {
["viewBanned"] => string(5) "unset"
["viewBanReason"] => string(5) "unset"
["viewBanCount"] => string(5) "unset"
["viewThreadBans"] => string(5) "unset"
["viewForumBans"] => string(5) "unset"
["viewPostContent"] => string(5) "unset"
}
["siropuEasyUserBanMod"] => array(5) {
["ban"] => string(5) "unset"
["unban"] => string(5) "unset"
["viewLog"] => string(5) "unset"
["deleteLogs"] => string(5) "unset"
["banIps"] => string(5) "unset"
}
["cxfTopNavigation"] => array(10) {
["topLink1"] => string(5) "unset"
["topLink2"] => string(5) "unset"
["topLink3"] => string(5) "unset"
["topLink4"] => string(5) "unset"
["topLink5"] => string(5) "unset"
["topLink6"] => string(5) "unset"
["topLink7"] => string(5) "unset"
["topLink8"] => string(5) "unset"
["topLink9"] => string(5) "unset"
["topLink10"] => string(5) "unset"
}
["changeAuthor"] => array(1) {
["view"] => string(5) "unset"
}
["chat"] => array(2) {
["view"] => string(5) "unset"
["admin"] => string(5) "unset"
}
["coverPhoto"] => array(3) {
["view"] => string(5) "unset"
["manageOwn"] => string(5) "unset"
["manageOthers"] => string(5) "unset"
}
["newMembers"] => array(2) {
["view"] => string(5) "unset"
["showEmail"] => string(5) "unset"
}
["showDeleted"] => array(2) {
["view"] => string(5) "unset"
["admin"] => string(5) "unset"
}
["ozzmodzThreadTitleEdit"] => array(1) {
["use"] => string(5) "unset"
}
}
["_xfRequestUri"] => string(26) "/admin.php?user-groups/add"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
 
I have the same problem

XF\Db\Exception: MySQL query error [1364]: Field 'avatar_frame_enable' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 79
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 220
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1521
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1253
  7. XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 71
  8. XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 189
  9. XF\Mvc\FormAction->run() in src/XF/Admin/Controller/UserGroup.php at line 119
  10. XF\Admin\Controller\UserGroup->actionSave() in src/XF/Mvc/Dispatcher.php at line 352
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  15. XF\App->run() in src/XF.php at line 524
  16. XF::runApp() in admin.php at line 13
You have an addon related avatar frame. That you might have uninstalled now, but that addon didn't remove it's table, so it is giving you an error. You can simply drop this table column from db or set it's value by changing its structure in db.
 
You have an addon related avatar frame. That you might have uninstalled now, but that addon didn't remove it's table, so it is giving you an error. You can simply drop this table column from db or set it's value by changing its structure in db.
Thanks bro, can you explain step by step, I am not profi - I am beginner, which folder, drop means delete or?
 
Disable addons one at a time until the errors stop.

As @JustinHawk said, the error is caused by a disabled or uninstalled add-on which has added a field to the database without a valid default value.

It could also be due to AUTO_INCREMENT missing from the column added to the database by this add-on.

Disabling the add-on won't help in this case.

If the add-on has been uninstalled, which it appears to be, contact the author and ask them which columns to drop from which tables.
Or get an updated working version of the add-on, install it, and uninstall it again.
 
I ve found in my Documents addon Avatar Frame 1.0.1 and installed them...now I can add User Group....I am not profi, that s all complicated for me, but I did it .....Thanks all of for your help.
 
Top Bottom