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

Importing error

Discussion in 'Troubleshooting and Problems' started by AT8500, Jan 27, 2013.

  1. AT8500

    AT8500 Member

    Today I started importing my phpBB into new xenForo installation. Everything was OK but in the middle of attachment importing I got this error:

    Server Error

    Mysqli statement execute error : Duplicate entry '20426' 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 1718
    8. XenForo_Model_Import->importPostAttachment() in XenForo/Importer/PhpBb3.php at line 2086
    9. XenForo_Importer_PhpBb3->stepAttachments() in XenForo/Importer/Abstract.php at line 77
    10. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
    11. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 132
    12. XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 310
    13. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    14. XenForo_FrontController->run() in /home/admin/mySite.net/forum/admin.php at line 13
    Please help!
  2. AT8500

    AT8500 Member

    Fixed it, it seems that premission were wrong, and it was hard to find file among 3,5GiB of data. But eventually fixed it.

    Now I have new problem. Links that are entered directly in to posts (in phpBB) are not converted coretly, so now I have bunch of posts with:

    <a class="postlink" href="http://www.somelink.com" onclick="window.open(this.href);return false;">http://www.somelink.com</a>

    Now, how to find all those links of this and replace it with normal link
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use Kier's addon:


    Here is the code you need to use with this addon:

    Quick Find: <a class="postlink"

    Regular Expression: #<a class="postlink" href="([^"]+)" onclick="window\.open\(this\.href\);return false;">([^<]+)</a>#siU

    Replacement String: [url=\1]\2[/url]

    That should do it.
    AT8500 likes this.
  4. AT8500

    AT8500 Member

    Above helped me alot, thank you very much.

    Would you please give me example how to find and change following:
    I have custom bb code (from my PHPBB installation) for youtube: [youtube]ABC1234FGH[/youtube] which I would now like to convert to standard youtube links, because those links are recognized automatically by BB code media sites.

    Because I don't know RegExp at all I would apprechiate if someone could help me as Jake helped me with previous replace
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Quick Find: [youtube

    Regular Expression: #\[youtube\]([^\[]+)\[/youtube\]#siU

    Replacement String: [media=youtube]\1[/media]
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    And media replacements often encounter an error from this setting, so you may need to increase it:

    Admin CP -> Home -> Options -> Messages -> Maximum Media Embeds per Message

Share This Page