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

XF 1.4 Forums Deleted during 2nd import

Discussion in 'Installation, Upgrade, and Import Support' started by Ocean44, Sep 29, 2014.

  1. Ocean44

    Ocean44 Member

    I am importing a vB 4.2 forum to XF 1.4. I have followed the best practices instructions, I have saved the import log and I'm also using the Import Tools by Waindigo addon.

    The 1st import works fine. Everything gets imported and I skipped nothing.
    Then sometime later, I go to do a second import to pick anything new from the live vB forum. I check 'Retain imported content IDs', put in all the config data, click validate, and before it gets to the page with all the import steps it says "Processing... Deleting... Threads" which takes some time.
    (Nothing had been deleted from the vB forum between the 1st and 2nd import.)
    Then it goes to the page with the import steps. Then I load the archived import log and proceed through all the steps.

    The result is that while new posts have been imported several forums have been deleted that were present after the 1st import.
    The deleted forums where id=1 in vB which was a Category and all it's Child forums.

    Why are some forums deleted?
    Should I not check the 'Retain imported content IDs' on subsequent imports?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You would need to seek support in the add-on thread as sequential imports are not supported in the default importer.
  3. Ocean44

    Ocean44 Member

    I understand...will do. Please delete this thread if you'd like.
  4. Chris D

    Chris D XenForo Developer Staff Member

    I have to say, though, that this is the expected behaviour even with the default importer.

    Whenever "Retain imported content IDs" is checked it deletes the existing nodes with the IDs 1 and 2.

    The reason the importer does this is because it assumes that your XenForo is a fresh install (which has a default category, node_id 1 and a default forum, node_id 2) and if you click specify to Retain IDs then these two nodes will be deleted otherwise when you try to import them you will get duplicate key errors.

    I understand the reasoning, but I have seen this catch people out. Consider a scenario where an add-on is importing data that isn't directly forum related, e.g. a Gallery or Blog. It's a surprise when some of your forums disappear as a result of that.

    If possible and easy to do in the vBulletin interface (been so long I have forgotten) then I would create a new category, and move all existing forums from that category ID 1 to the new category before the import. Don't forget this likely affects a forum or category with ID 2 too so if that exists you will need to somehow take care of that too.

    Failing that, you would have to complete the entire import in one sitting.
  5. Mike

    Mike XenForo Developer Staff Member

    It's a default behavior, but it can be overridden by the importer. (public function retainKeysReset())
    Chris D likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Indeed. I handle it with my own code in the gallery for pre-XF 1.3 compatibility.
  7. Ocean44

    Ocean44 Member

    Thanks for explaining the 'why' of it.
    I came to the same conclusion about moving things around in vB pre-import or just doing it in one shot.

Share This Page