• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved [resolved] Error creating category

hollosch

New Member
AMS Premium
UBS Premium
  • XF\Db\Exception: MySQL query error [1364]: Field 'options' doesn't have a default value
  • src/XF/Db/AbstractStatement.php:212
  • Generiert von: hollosch
  • 2. Januar 2019 um 11:08
Stack-Trace
INSERT INTO `xf_xa_ams_category` (`default_prefix_id`, `title`, `description`, `parent_category_id`, `display_order`, `min_tags`, `thread_node_id`, `thread_prefix_id`, `require_prefix`, `style_id`, `content_image`, `content_title`, `content_message`, `content_term`, `allow_articles`, `require_article_image`, `allow_comments`, `allow_ratings`, `require_review`, `allow_pros_cons`, `allow_anon_reviews`, `allow_author_rating`, `allow_location`, `allow_poll`, `allow_original_source`, `require_original_source`, `layout_type`, `category_id`, `article_count`, `featured_count`, `last_article_date`, `last_article_title`, `last_article_id`, `prefix_cache`, `field_cache`, `review_field_cache`, `lft`, `rgt`, `depth`, `breadcrumb_data`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1364, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1364, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1409): XF\Db\AbstractAdapter->insert('xf_xa_ams_categ...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1141): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Mvc/FormAction.php(159): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/addons/XenAddons/AMS/Admin/Controller/Category.php(178): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(249): XenAddons\AMS\Admin\Controller\Category->actionSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\AMS:C...', 'Save', 'json', Object(XF\Mvc\ParameterBag), 'xa_amsCategorie...', Object(XenAddons\AMS\Admin\Controller\Category), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1934): XF\Mvc\Dispatcher->run()
#13 src/XF.php(333): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}
Status der Anfrage
array(4) {
["url"] => string(35) "/admin.php?xa-ams/categories/0/save"
["referrer"] => string(57) "https://www.domain.com/admin.php?xa-ams/categories/add"
["_GET"] => array(1) {
["xa-ams/categories/0/save"] => string(0) ""
}
["_POST"] => array(14) {
["title"] => string(10) "TellerRand"
["description"] => string(44) "News außerhalb des regionalen Suppentellers"
["content_term"] => string(0) ""
["parent_category_id"] => string(1) "0"
["display_order"] => string(1) "1"
["min_tags"] => string(1) "0"
["thread_node_id"] => string(1) "0"
["content_image"] => string(0) ""
["content_title"] => string(0) ""
["content_message"] => string(0) ""
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(32) "/admin.php?xa-ams/categories/add"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Field 'options' doesn't have a default value
There is no field named 'options' in the AMS Category table for XF2. That was an old AMS 1.x field that has been removed.

Looks like some SQL was not properly run on your DB. I'll need to get access via phpMyAdmin so that I can take a quick look at your AMS schema and fix anything that is wrong (like removing that field that should not be there). Send me an inbox with login details and phpMyAdmin login credentials.

-B
 
This issue was do to the OP having a DataBase Schema issue (a field in a table that should have been removed, but wasn't).

If anyone else runs into this particular case ('option' field in the 'xf_xf_ams_category' table) , please let me know.

Note: This is an isolated issue with some very early beta versions of AMS that only Premium license holders had access too.
 
Last edited:
This issue was do to the OP having a DataBase Schema issue (a field in a table that should have been removed, but wasn't).

If anyone else runs into this particular case ('option' field in the 'xf_xf_ams_category' table) , please let me know.

I just did as well...

Code:
Oops! It seems the path you have chosen is blocked, Adventurer.
XF\Db\Exception: MySQL query error [1364]: Field 'options' doesn't have a default value in src/XF/Db/AbstractStatement.php at line 212

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 160
    XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1409
    XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1141
    XF\Mvc\Entity\Entity->save() in src/XF/Mvc/FormAction.php at line 69
    XF\Mvc\FormAction->XF\Mvc\{closure}() in src/XF/Mvc/FormAction.php at line 159
    XF\Mvc\FormAction->run() in src/addons/XenAddons/AMS/Admin/Controller/Category.php at line 178
    XenAddons\AMS\Admin\Controller\Category->actionSave() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1934
    XF\App->run() in src/XF.php at line 333
    XF::runApp() in admin.php at line 13

I'll send the path and log-in information to our DB to you in a PM. Thanks good sir! :p
 
  • Like
Reactions: Bob
Back
Top