• 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 Issue with item rating

NinaMcI

Member
Showcase
Hi Bob,

I seem to have an issue when users try to leave an item rating. Please see the error below:

Code:
XF\Db\Exception: MySQL query error [1364]: Field 'title_legacy' doesn't have a default value src/XF/Db/AbstractStatement.php:228
Generated by: Archie Jan 28, 2021 at 11:03 AM
Stack trace
INSERT  INTO `xf_xa_sc_item_rating` (`item_id`, `user_id`, `username`, `rating_state`, `message`, `embed_metadata`, `rating`, `pros`, `cons`, `title`, `is_review`, `rating_id`, `rating_date`, `author_response_contributor_user_id`, `author_response_contributor_username`, `author_response`, `custom_fields`, `warning_id`, `warning_message`, `ip_id`, `is_anonymous`, `attach_count`, `last_edit_date`, `last_edit_user_id`, `edit_count`, `reply_count`, `first_reply_date`, `last_reply_date`, `latest_reply_ids`, `reaction_score`, `reactions`, `reaction_users`, `vote_score`, `vote_count`) 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(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1510): XF\Db\AbstractAdapter->insert('xf_xa_sc_item_r...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1242): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/XenAddons/Showcase/Service/Item/Rate.php(226): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Service/ValidateAndSavableTrait.php(40): XenAddons\Showcase\Service\Item\Rate->_save()
#8 src/addons/XenAddons/Showcase/Pub/Controller/Item.php(734): XenAddons\Showcase\Service\Item\Rate->save()
#9 src/XF/Mvc/Dispatcher.php(350): XenAddons\Showcase\Pub\Controller\Item->actionRate(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\Showc...', 'Rate', Object(XF\Mvc\RouteMatch), Object(XenAddons\Showcase\Pub\Controller\Item), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenAddons\Showcase\Pub\Controller\Item), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#14 src/XF.php(488): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
 
Last edited:
Hi :)

Which version of Showcase are you running? That field was a TEMP field used during the conversion that SHOULD have been removed. SC 3.2.1 Upgrade included an additional function to check if that still existed and attempts to remove it. Even if you are running an older version of Showcase 3.x, you should be able to safely remove that field from the 'xf_xa_sc_item_rating' table.
 
Back
Top