1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Import problem: Out of range value adjusted for column 'attach_count' at row 1

Discussion in 'Resolved Bug Reports' started by dutchbb, Mar 18, 2011.

  1. dutchbb

    dutchbb Well-Known Member

    I was almost done with the first test import, this happened during the import of attachments, it keeps showing when I return to the import page.
    Server Error
    Mysqli statement execute error : Out of range value adjusted for column 'attach_count' at row 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 XenForo/Model/Import.php at line 1023
    XenForo_Model_Import->importPostAttachment() in XenForo/Importer/vBulletin.php at line 2089
    XenForo_Importer_vBulletin->stepAttachments() in XenForo/Importer/Abstract.php at line 77
    XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 161
    XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 105
    XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/xxxx/domains/mydomain.com/public_html/xxxx/admin.php at line 13
  2. Mike

    Mike XenForo Developer Staff Member

    The counter in vB was probably wrong, or you have 65000 attachments to one post. :)

    I actually found 2 minor bugs here - the attach count code in the import is wrong.

    In library/XenForo/Importer/vBulletin.php, you should change:
    'attach_count' => $post['attach'],
    'attach_count' => 0,
    Then in library/XenForo/Model/Import.php, change:
    attach_count = attach_count + 1
    attach_count = IF(attach_count < 65535, attach_count + 1, 65535)
    The second change will prevent this error. The only way for the counts to be right (and there was a bug in XF that caused them to be wrong before as well) is to do a fresh import.
  3. dutchbb

    dutchbb Well-Known Member

    Ok thanks for the quick response, I'll give it another try :)

Share This Page