1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then 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.

Fixed Deleting item from category with 1 item

Discussion in 'Showcase Resolved Bug Reports' started by MagnusB, Nov 14, 2012.

  1. MagnusB

    MagnusB Member Showcase

    Not sure if this is a bug, or if something went wrong with my site. But I just installed, created a category and a test item, noticed I needed to redo the category a bit so I deleted the item. Then I got this error:
    Code:
    Server Error
     
    Mysqli statement execute error : BIGINT UNSIGNED value is out of range in '(`DBNAME`.`xf_nflj_showcase_category`.`item_count` - 1)'
     
    Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in NFLJ/Showcase/DataWriter/Item.php at line 315
    NFLJ_Showcase_DataWriter_Item->_postDelete() in XenForo/DataWriter.php at line 1738
    XenForo_DataWriter->delete() in NFLJ/Showcase/Model/Item.php at line 806
    NFLJ_Showcase_Model_Item->deleteItem() in NFLJ/Showcase/ControllerPublic/Item.php at line 477
    NFLJ_Showcase_ControllerPublic_Item->actionDelete() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in ~/index.php at line 13
     
  2. Bob

    Bob Developer Staff Member

    Its not you or your site, its a bug (an over site on my part in the post_delete method in the item datawriter). Its doing an action that should only be done with visible state items (which I over looked when I added in the "states" functionality for moderated and soft deleted).

    I just fixed it. I'll be releasing RC 1 later today that will include the additional code in the datawriter that prevents this from happening.
     
  3. MagnusB

    MagnusB Member Showcase

    Yeah, I just noticed that it was in moderation, I just took a quick allow all for admins and figured everything was OK.
     
    Bob likes this.
  4. Bob

    Bob Developer Staff Member

    I Normally don't oversee things like this lol Thanks for finding it :D
     
  5. MagnusB

    MagnusB Member Showcase

    Completely by accident, I assure you :D
     
  6. Bob

    Bob Developer Staff Member

    its a good thing ya caught it, or it might have not been caught for awhile lol RC1 is being released tomorrow. Im just finishing up the preliminary "featured" items functionality.
     
    MagnusB likes this.
  7. MagnusB

    MagnusB Member Showcase

    Nice, looking forward to it :D
     
  8. oman

    oman Member AMS Premium Showcase

    Don't mean to bump this up, but I got this on v 1.3.0 today when deleting an item. I had to delete it via phpmyadmin

    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : BIGINT UNSIGNED value is out of range in '(`mycourtt_xenforo`.`xf_nflj_showcase_category`.`item_count` - 1)' - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: oman, 5 minutes ago
    Stack Trace
    #0 /home/mycourtt/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /home/mycourtt/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /home/mycourtt/public_html/library/NFLJ/Showcase/Model/Category.php(823): Zend_Db_Adapter_Abstract->query('??            ?...', Array)
    #3 /home/mycourtt/public_html/library/NFLJ/Showcase/DataWriter/Item.php(507): NFLJ_Showcase_Model_Category->updateItemCount(NULL, 3)
    #4 /home/mycourtt/public_html/library/NFLJ/Showcase/DataWriter/Item.php(714): NFLJ_Showcase_DataWriter_Item->_updateRemoveCategoryItemsCount(3)
    #5 /home/mycourtt/public_html/library/XenForo/DataWriter.php(1767): NFLJ_Showcase_DataWriter_Item->_postDelete()
    #6 /home/mycourtt/public_html/library/NFLJ/Showcase/Model/Item.php(908): XenForo_DataWriter->delete()
    #7 /home/mycourtt/public_html/library/NFLJ/Showcase/ControllerPublic/Index.php(1183): NFLJ_Showcase_Model_Item->deleteItem(Array, 'hard')
    #8 /home/mycourtt/public_html/library/XenForo/FrontController.php(347): NFLJ_Showcase_ControllerPublic_Index->actionDelete()
    #9 /home/mycourtt/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #10 /home/mycourtt/public_html/index.php(13): XenForo_FrontController->run()
    #11 {main}
    Request State
    array(3) {
      ["url"] => string(45) "http://mycourttalk.com/showcase/test.2/delete"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(3) {
        ["hard_delete"] => string(1) "1"
        ["_xfConfirm"] => string(1) "1"
        ["_xfToken"] => string(8) "********"
      }
    }
    Mind you it may have been fixed in 1.3.1.
     
  9. Bob

    Bob Developer Staff Member

    ya, it was fixed in 1.3.1 :)
     
  10. Goodfella

    Goodfella Guest

    Dont mean to bump a old thread but also having similar error:

    Mysqli statement execute error : BIGINT UNSIGNED value is out of range in '(`XXXXX`.`xf_user`.`showcase_count` - 1)'

    1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    3. Zend_Db_Adapter_Abstract->query() in NFLJ/Showcase/DataWriter/Item.php at line 902
    4. NFLJ_Showcase_DataWriter_Item->_itemRemoved() in NFLJ/Showcase/DataWriter/Item.php at line 539
    5. NFLJ_Showcase_DataWriter_Item->_postSave() in Bookmarks/DataWriter/Showcase/Item.php at line 56
    6. Bookmarks_DataWriter_Showcase_Item->_postSave() in XenForo/DataWriter.php at line 1409
    7. XenForo_DataWriter->save() in NFLJ/Showcase/ControllerPublic/Showcase.php at line 1882
    8. NFLJ_Showcase_ControllerPublic_Showcase->actionDelete() in XenForo/FrontController.php at line 347
    9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    10. XenForo_FrontController->run() in /home/medrookie/public_html/index.php at line 13
     
  11. Bob

    Bob Developer Staff Member

    Did you rebuild all the counters? Part of the upgrade from the version that was happening in required rebuilding the counters. This was only possible on OLDER versions of showcase. Its not possible to do in new versions (unless you manually modify the count values in that field).
     
  12. Goodfella

    Goodfella Guest

    I just rebuilt all the counters with the same error.
     
  13. Bob

    Bob Developer Staff Member

    sending you an inbox about this.
     
    Goodfella likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.