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

XenForo Importer

Discussion in 'XenForo Development Discussions' started by xf_phantom, Feb 28, 2014.

  1. xf_phantom

    xf_phantom Well-Known Member

    How does the user import works?

    I've copied the existing phpbb importer and changed only the table and fieldnames:D
    It's working fine for the forums but i'm having troubles with the users (my threads import works too, if i remove the users dependency, all therads and posts are here, the usernames are also imported, but the post was created by an guest, i'm sure it's only because the userId lookup failed:cool:)

    The percentage doesn't change and i'm getting an endless loop
    loop.png
    BUT the users are imported! They're all in the usertable, i can even log in with them BUT they're NOT in the import log and the import step never finishes official.

    it seems that the importer once he imported all users gets back to the first user and then my endless loop starts

    Is there any documentation available for custom importers?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    A few things to check.
    • Make sure the $next value is set to the current user ID in your loop.
    • Make sure your user import step is actually returning the correct new user ID or at least returning true.
    • Make sure if the user is imported successfully that the $total++ is incremented.
    • Make sure you send the updated total to the import session:
      PHP:
      $this->_session->incrementStepImportTotal($total);
    • Make sure the max value has been ascertained correctly.
     

Share This Page