Bug Error presented when shop item title is long

Status
Not open for further replies.

Espresso

Customer
Admin CP -> DB Shop -> Items -> Create item

I added an item title that was a bit longer than normal and received the error below. I shortened the title and the item was added as expected.

XF\Db\Exception: MySQL query error [1406]: Data too long for column 'title' at row 1 in src/XF/Db/AbstractStatement.php at line 217
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 89
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 172
  5. XF\Db\AbstractAdapter->insert() in src/XF/Mvc/Entity/Entity.php at line 1452
  6. XF\Mvc\Entity\Entity->_saveToSource() in src/XF/Mvc/Entity/Entity.php at line 1184
  7. XF\Mvc\Entity\Entity->save() in src/addons/DBTech/Shop/Service/Item/Create.php at line 344
  8. DBTech\Shop\Service\Item\Create->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
  9. DBTech\Shop\Service\Item\Create->save() in src/addons/DBTech/Shop/Admin/Controller/Item.php at line 491
  10. DBTech\Shop\Admin\Controller\Item->DBTech\Shop\Admin\Controller\{closure}() in src/XF.php at line478
  11. XF::asVisitor() in src/addons/DBTech/Shop/Admin/Controller/Item.php at line 495
  12. DBTech\Shop\Admin\Controller\Item->actionSave() in src/XF/Mvc/Dispatcher.php at line 321
  13. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  14. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  15. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  16. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  17. XF\App->run() in src/XF.php at line 390
  18. XF::runApp() in admin.php at line 13
 
In the next version, I'll add a max length constraint to the entity and the template. Thanks :)
 
Hello @Espresso,

We hope your ticket regarding DragonByte Shop has been addressed to your satisfaction. This ticket has now been closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Shop

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,187
Customer rating
5.00 star(s) 3 ratings
Back
Top