XF 1.4 Import Attached Files Error

Lone Wolf

Well-known member
I'm doing an XF 1.4.7 import from a 5 year old forum into a fresh 1.4.7 install. I've selected for imported content ID's to replace existing content IDs.

Everything has worked fine up till I tied to 'Import Attached Files' and then I keep getting this error...

Server Error

Mysqli statement execute error : Duplicate entry '1' 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 1624
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
XenForo_DataWriter->save() in XenForo/Model/Import.php at line 1890
XenForo_Model_Import->importAttachment() in XenForo/Importer/XenForo.php at line 2294
XenForo_Importer_XenForo->stepAttachments() in XenForo/Importer/Abstract.php at line 97
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 187
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 239
XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 182
XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/domain/public_html/admin.php at line 13
 
Yes, I meant destination.

A duplicate entry error shouldn't be thrown if there is no content at all.
Was there some content which was deleted?

No nothing. It was a completely fresh install of 1.4.7. I changed the favicon and logo-og files and added some styles folders.Do you think it might be one of those?
 
This shouldn't be related. In the destination forum, you can try emptying the xf_attachment and xf_attachment_data tables and then attempting to continue the import.
 
Thanks Mike but I deleted everything and tried again. This time the attachments transferred without any problems.

I'll remember your advice about the attachment tables if it ever happens again.
 
Back
Top Bottom