XF 1.2 vB4 to XF - Duplicate Entry Error due to time out

Big Dan

Active member
Hi Guys,

Just ran into an issue with the vB4 importer. Of course two test imports with the same data went just fine. Anywho the script timed out importing attachments and when I tried to resume I get the following error.

Server Error
Mysqli statement execute error : Duplicate entry '21648' for key 'PRIMARY'

[*]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 Zend/Db/Adapter/Abstract.php at line 574
[*]Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1612
[*]XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1601
[*]XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1393
[*]XenForo_DataWriter->save() in XenForo/Model/Import.php at line 1861
[*]XenForo_Model_Import->importAttachment() in XenForo/Model/Import.php at line 1907
[*]XenForo_Model_Import->importPostAttachment() in XenForo/Importer/vBulletin4x.php at line 114
[*]XenForo_Importer_vBulletin4x->stepAttachments() in XenForo/Importer/Abstract.php at line 77
[*]XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 183
[*]XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 135
[*]XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 337
[*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
[*]XenForo_FrontController->run() in /home/xxxx/public_html/admin.php at line 13

Please tell me I can just delete it via phpmyadmin and continue.



XenForo developer
Staff member
You should be able to delete the 21648 record from xf_attachment and xf_attachment_data and continue.