Bug Discarding an item in inventory produces error

Status
Not open for further replies.

Espresso

Customer
When I visit shop -> inventory - > discard an item I get this error

XF\Db\Exception: MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '(commj373_ctmbd.xf_dbtech_shop_item.purchases - 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/addons/DBTech/Shop/Entity/Purchase.php at line 279
  5. DBTech\Shop\Entity\Purchase->_postDelete() in src/XF/Mvc/Entity/Entity.php at line 1580
  6. XF\Mvc\Entity\Entity->delete() in src/addons/DBTech/Shop/ItemType/AbstractHandler.php at line 607
  7. DBTech\Shop\ItemType\AbstractHandler->discard() in src/addons/DBTech/Shop/Pub/Controller/Inventory.php at line 172
  8. DBTech\Shop\Pub\Controller\Inventory->actionDiscard() in src/XF/Mvc/Dispatcher.php at line 321
  9. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
  10. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  13. XF\App->run() in src/XF.php at line 390
  14. XF::runApp() in index.php at line 20
 
This is more about the error in the admin CP


  • XF\Db\Exception: MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '(commj373_ctmbd.xf_dbtech_shop_item.purchases - 1)'
  • src/XF/Db/AbstractStatement.php:217
  • Generated by: Dan
  • Feb 17, 2019 at 2:46 PM
Stack trace
UPDATE xf_dbtech_shop_item
SET purchases = purchases - 1
WHERE item_id = ?

------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1690, '22003')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1690, '22003')
#2 src/XF/Db/AbstractAdapter.php(89): XF\Db\Mysqli\Statement->execute()
#3 src/addons/DBTech/Shop/Entity/Purchase.php(279): XF\Db\AbstractAdapter->query('
UPDATE xf_d...', 2)
#4 src/XF/Mvc/Entity/Entity.php(1580): DBTech\Shop\Entity\Purchase->_postDelete()
#5 src/addons/DBTech/Shop/ItemType/AbstractHandler.php(607): XF\Mvc\Entity\Entity->delete(true, false)
#6 src/addons/DBTech/Shop/Pub/Controller/Inventory.php(172): DBTech\Shop\ItemType\AbstractHandler->discard(NULL)
#7 src/XF/Mvc/Dispatcher.php(321): DBTech\Shop\Pub\Controller\Inventory->actionDiscard(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('DBTech\\Shop:Inv...', 'Discard', Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Pub\Controller\Inventory), NULL)
#9 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Pub\Controller\Inventory), NULL)
#10 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#12 src/XF.php(390): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}
Request state
array(4) {
["url"] => string(28) "/rewards/inventory/2/discard"
["referrer"] => string(45) "https://www.cashthirst.com/rewards/inventory/"
["_GET"] => array(0) {
}
["_POST"] => array(5) {
["_xfRedirect"] => string(45) "https://www.cashthirst.com/rewards/inventory/"
["_xfToken"] => string(8) "****"
["_xfRequestUri"] => string(19) "/rewards/inventory/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
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 XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,649
Customer rating
5.00 star(s) 3 ratings
Back
Top