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

Importing users via an excel file

Discussion in 'Installation, Upgrade, and Import Support' started by Lone Wolf, Oct 13, 2011.

  1. Lone Wolf

    Lone Wolf Well-Known Member

    Hi I'm a total luddite and we suffered to a corrupted database on an old vb install from one of my previous websites. My webmaster at the time said he was only able to save an exported file (it's an excel file, csv or something) of users leftover from that board.

    I've looked at the file and it's just usernames and email addresses, no passwords or anything. The webmaster is long gone and I was wondering if there was any way that I could use this file to recreate my userbase for that board on XenForo? If not, then is there any way to recreate it on vb or some other forum software and then import it into xenforo instead.

    It's always sad to see a community die away and a lot of those ex-members have said they'd like to see it revived. Does anyone have any ideas how to achieve this?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ImpEx (vBulletin's importer) can import users from a CSV file to vBulletin. Then you can import from vBulletin to XenForo using the built-in importer.

    There is no direct CSV user import for XenForo. If you have access to a programmer then you can make one.
     
  3. Lone Wolf

    Lone Wolf Well-Known Member

    Thats sounds like a plan Jake. Are there any idiots guides to using impex to do that?
     
  4. Floris

    Floris Guest

    I use ImpEx for this. Running it stand alone, importing cvs, and then importing that database in xenforo via the vb module. Works great.
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ImpEx has it's own manual:

    https://www.vbulletin.com/docs/html/impex

    Basically you install vB, install ImpEx, run ImpEx through your Admin CP, select the "txt_file" system, point it to the CSV file.
     
  6. Lone Wolf

    Lone Wolf Well-Known Member

    How do you run it standalone?

    I keep getting errors. I uploaded impex to my test vb install. On the config file I put in the target database details and set the source database to 'false' since I dont have an online database to import from.

    When I go to the VB ACP and then Import --> Import, I get the error below...

    Line 522 is the last line in that file and is blank. Any ideas what's going wrong?
     
  7. Lone Wolf

    Lone Wolf Well-Known Member

    Thanks for the help guys, I re-installed it and managed to get it working
     
  8. Lone Wolf

    Lone Wolf Well-Known Member

    I can use the Impex Text File Importer to add users without a problem but it deletes my existing user database (except Admin). It's lucky I tried it on a test install and not live!! Is there any way around this?
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Did your vB forum have users? I was under the impression this was a temporary vB installation for the purpose of importing to XenForo in which case there would only be an admin account.

    ImpEx does nondestructive imports. The only exception is if you run two consecutive imports on the same vB database. In the case of two imports, if you fail to close out the import session on the first one then the second import will start by deleting the previously imported data. Be sure to close the import session between imports when using ImpEx.
     
  10. Lone Wolf

    Lone Wolf Well-Known Member

    I should have explained better. I have split the Text Files into custom usergroup lists.

    For example I load in custom usergroup list 1 and then move all the users from 'Imported Users' to 'Custom 1'

    Then I load in list 2 but all the users from before get deleted. I guess I could load them all in as one list but it would take forever to put them into usergroups again
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If you need to run the import in batches then you will have to close out the import session between each batch. Otherwise it will delete the previously imported users every time you re-run the user module.

    To close out the import session you need to click the cleanup link at the top of the ImpEx page.
     
  12. Lone Wolf

    Lone Wolf Well-Known Member

    Doing that gives me lots of errors...

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 55

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 107

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 111

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 119

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 130

    Deprecated: Assigning the return value of new by reference is deprecated in /home/cricista/public_html/demo/forums2/includes/init.php on line 134

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 142

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 211

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/init.php on line 389

    Deprecated: Assigning the return value of new by reference is deprecated in /site/demo/forums2/includes/class_core.php on line 2552
     
  13. Lone Wolf

    Lone Wolf Well-Known Member

    and this...

    Impex Help page

    Deleteing Impex Session.

    There seems to have been a problem with the database.
    ImpEx Database error​

    mysql error: Invalid SQL: DELETE FROM datastore WHERE title='ImpExSession';​

    mysql error: Table 'cricista_forums2.datastore' doesn't exist​

    mysql error number: 1146​

    Date: Thursday 13th 2011f October 2011 02:04:48 PM​
    Database: cricista_forums2​
    MySQL error: Table 'cricista_forums2.datastore' doesn't exist​
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    New PHP doesn't like old ImpEx.

    Try disabling error reporting by adding this line to your impex/ImpExConfig.php file:

    Code:
    error_reporting(0);
    
    Make sure the target information is correct in your impex/ImpExConfig.php file, including the table prefix.
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The error_reporting level is actually set in a few files. You may have to edit them all:

    impex/
    index.php
    impex_language.php
    help.php
    db_mysql.php
     
    Lone Wolf likes this.
  16. Lone Wolf

    Lone Wolf Well-Known Member

    Thanks Jake, that fixed it. i tested the imports and it worked fine.

    BUT now when impex asks for my customer number, it accepts the number and then redirects me back to the 'enter customer number' screen again. It's an infinite loop.

    impeX + vb = super buggy.

    cant someone write one for xenforo so we dont have to deal with this complicated headache anymore.
     
  17. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That means you are entering the wrong customer number. Or at least a different number than the one for which your ImpEx package was downloaded.

    And make sure cookies are enabled in your browser.
     
  18. Lone Wolf

    Lone Wolf Well-Known Member

    No it's the same number I used to get in before and it doesn't say that the number is wrong. It says something about the customer number being accepted and then redirects me back to the 'enter the customer number' screen again.

    Anyway that's not a problem anymore because it wont even let me log into my ACP now. I got to forums/admincp and enter my details, it says 'Welcome Admin' and then takes me back to the enter your login details ACP screen again.

    It's a good job it's just a test forum!
     
  19. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Both of those things sound like cookie problems.

    Did you change the cookie domain or path in the Admin CP? If you changed the cookie settings in vBulletin to something invalid or out of scope then cookies will cease to function. You can reset the cookie settings by uploading the tools.php file (from the do_not_upload folder in the vB zip file) to your install/ directory (in vB), then run it from your browser.
     
  20. Lone Wolf

    Lone Wolf Well-Known Member

    The cookie path seems to be fine, I haven't touched it...



    Cookies


    Cookie Prefix vb (set in includes/config.php)
    [Reset Cookie Domain] Reset the cookie domain to be blankCurrently: ( blank )
    [Reset Cookie Path] Reset the cookie path to be /Currently: /demo/forums/
     

Share This Page