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

Importing problem

Discussion in 'Installation, Upgrade, and Import Support' started by KenX, Aug 10, 2012.

  1. KenX

    KenX Member

    I recently got my SMF database converted to IPB 3.3 by my friend and now I am trying to convert it to Xenforo.
    I am getting an error when I import user groups

    " Server Error

    Mysqli statement execute error : Duplicate entry '5' 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 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 618
    9. XenForo_Model_Import->importUserGroup() in XenForo/Importer/IPBoard.php at line 346
    10. XenForo_Importer_IPBoard->stepUserGroups() 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 232
    13. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 175
    14. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
    15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    16. XenForo_FrontController->run() in /home/creamy/public_html/admin.php at line 13 "

    How can I solve it?

     
  2. CyclingTribe

    CyclingTribe Well-Known Member

    If you have phpMyAdmin have a look at the field that the PRIMARY key is built on.

    Whatever it is (usergroup ID maybe?) there appear to be two or more with the same value ...'5' ... and the import appears to be wanting unique values.

    Cheers,
    Shaun :D
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Normally this is caused by enabling the option to preserve the source ids while importing into an already populated XF database. ie you created groups in XF beyond the default groups, then imported with the source id option enabled. The XF forum needs to be empty to use the source id option. Otherwise you can get collisions like this.
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    Ah, yes, sorry, hadn't thought about it that way - so if the XF default ID's already exist ... the incoming usergroups with the same ID's will clash and halt the process. Nice one Jake. (y)
     
  5. KenX

    KenX Member

    Thanks Jake.I had created another usergroup other than the default.When I deleted it.It worked.

    First I was getting the same error as this person in this thread http://xenforo.com/community/threads/conversion-from-ip-board.33832/#post-385776

    I followed your steps.Now I am getting this error in "Import Threads and Posts"

    "Server Error

    Mysqli statement execute error : Duplicate entry '4' 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 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 1478
    9. XenForo_Model_Import->importThread() in XenForo/Importer/IPBoard.php at line 2604
    10. XenForo_Importer_IPBoard->stepThreads() 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 232
    13. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 175
    14. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
    15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    16. XenForo_FrontController->run() in /home/creamy/public_html/admin.php at line 13"
    How can I fix this?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The XF forum should have no threads or posts, otherwise you can get collisions like with the usergroups. Try deleting any threads / posts on your forum.
     
  7. KenX

    KenX Member

    I searched every board and every sub-board.There was one thread.I pressed the delete button and I got an error.Now I searched for it and it is gone.I double checked.But still,I am getting the error.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What was the error on delete?

    More generally, I recommend importing into a brand new XF forum without any content. Or run the import without enabling the option to preserve the source ids. That will avoid these errors.
     
  9. KenX

    KenX Member

    I have successfully completed the import.I created another user and gave him admin positions.Then I logged in from that account then I saw a thread which said that is visible to admins and moderators.I deleted it and it worked.
    The error I got was "Your not allowed to delete".Do you know why I had got that before?Since I was the admin I am allowed to delete.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It must have been a lack of permissions. You would need moderator permissions, not admin permissions.
     

Share This Page