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

XF 1.5 (SOLVED) Importing an SMF 2.0.11 forum to Xenforo 1.5.8

Hello all,

I've just started importing my SMF forum to my new Xenforo.
User Groups, Users, Custom Avatars and Private Messages are all imported.

When I try to import Forums I get this:
Server Error
Mysqli statement execute error : Duplicate entry '3' for key 'PRIMARY'

  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 1638
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
  7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 617
  8. XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 1274
  9. XenForo_Model_Import->importForum() in XenForo/Importer/SMF.php at line 1380
  10. XenForo_Importer_SMF->_importForumTree() in XenForo/Importer/SMF.php at line 1393
  11. XenForo_Importer_SMF->_importForumTree() in XenForo/Importer/SMF.php at line 1330
  12. XenForo_Importer_SMF->stepForums() in XenForo/Importer/Abstract.php at line 124
  13. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
  14. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 241
  15. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 184
  16. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 351
  17. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  18. XenForo_FrontController->run() in admin.php at line 13

I am very beginner on SQL and so on. Googled and found a Russian site but could not make any sense out of it.
He said that changing ID of and existing group in Xenforo would solve it.

Anyway, I really need help, as I said I'm totally beginner with SQL so please be patience with me :D
Last edited:

Chris D

XenForo developer
Staff member
Prior to running the import did you create some nodes yourself? If so these will need to be removed before running the import.
Think I found the problem (stupid me).
I checked "use same ID as old forum" (something like that) in the beginning of the transfer.
I did not think that my pages would affect this. But it does sine pages and forums are both nodes in Xenforo but in SMF they are not the same.
So when I was importing the nodes that I created on Xenforo would have same ID as my SMF forums ID.

So what I did was that I check on my old SMF forum. I checked the last forum that I created and then went to the admin panel-> forums and checked the ID and it was 269. To not conflict Xenforo Nodes and SMF forum I decided to rename the Xenforo node ID to 301, 302 etc.

I did this with Phpmyadmin, went to xf_node. Edited "node_id" to 301, 302 etc so that it would not conflict with my old forums ID.

Hope this helps any other having this problem.

This did so that the page did not work.
So you have to extract all info using phpmyadmin and chech each node
Last edited: