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

Duplicate Entry error

Lisa

Well-known member
#1
Running a trial import from IPB 3.1.4 on a site with 1.6M posts. Everything runs smoothly (4.5 hours to do posts/threads) but when I get to Polls I get the following error and can't get beyond it.

Mysqli statement execute error : Duplicate entry '842' for key 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 Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
  7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 580
  8. XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 1627
  9. XenForo_Model_Import->importThreadPoll() in XenForo/Importer/IPBoard.php at line 2917
  10. XenForo_Importer_IPBoard->stepPolls() in XenForo/Importer/Abstract.php at line 77
  11. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
  12. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 132
  13. XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 310
  14. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  15. XenForo_FrontController->run() in /xftest/admin.php at line 13
Hoping against hope I don't have to start the import again from scratch.... and that one of you guys know how to get around this :)
 

Lisa

Well-known member
#3
Looking forward to seeing it settled on XF - just need to get past this error *begs in everyone's general direction*
 

Mike

XenForo developer
Staff member
#4
I recently fixed this in the vB importer - hadn't seen it in IPB. It's an error with the source data generally, where it thinks the same poll is attached to multiple threads.

Let me see if I can get you an updated importer (it's a simple change), but I won't have done much testing on it.
 

Lisa

Well-known member
#8
Finally got through the post/threads import... started to do polls and now getting this error :(

Mysqli statement execute error : Duplicate entry 'thread-10858' for key 2 -
Stack Trace​
/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
/library/XenForo/DataWriter.php(1591): Zend_Db_Adapter_Abstract->insert('xf_poll', Array)
/library/XenForo/DataWriter.php(1580): XenForo_DataWriter->_insert()
library/XenForo/DataWriter.php(1381): XenForo_DataWriter->_save()
/library/XenForo/Model/Import.php(580): XenForo_DataWriter->save()
/library/XenForo/Model/Import.php(1627): XenForo_Model_Import->_importData(924, 'XenForo_DataWri...', 'poll', 'poll_id', Array)
/library/XenForo/Importer/IPBoard.php(2924): XenForo_Model_Import->importThreadPoll(924, '10858', Array, Array, Array)
library/XenForo/Importer/Abstract.php(77): XenForo_Importer_IPBoard->stepPolls(841, Array)
library/XenForo/ControllerAdmin/Import.php(180): XenForo_Importer_Abstract->runStep(Object(XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'polls', 841, Array)
/library/XenForo/ControllerAdmin/Import.php(132): XenForo_ControllerAdmin_Import->_runStep(Object(XenForo_Importer_IPBoard), Object(XenForo_ImportSession), 'polls', 841, Array)
/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Import->actionImport()
/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
/admin.php(13): XenForo_FrontController->run()
 

Mike

XenForo developer
Staff member
#9
I'd need FTP and admin CP access to debug it any further. If you can do that, please submit a ticket with those details.