• Resolved Mirte

    (@mirte)


    This sounds like the perfect plugin, unfortunately, it’s not working for me.
    I’m using the latest version of WordPress and BuddyPress and version 0.3 of this plugin.

    When importing the example import.csv file, I get this error:

    Warning: Invalid argument supplied for foreach() in /mnt/webe/b2/16/52174216/htdocs/wp/wp-content/plugins/import-users-from-csv/import-users-from-csv.php on line 114

    Warning: Cannot modify header information – headers already sent by (output started at /mnt/webe/b2/16/52174216/htdocs/wp/wp-content/plugins/import-users-from-csv/import-users-from-csv.php:114) in /mnt/webe/b2/16/52174216/htdocs/wp/wp-includes/pluggable.php on line 866

    Also, when importing my own CSV file, using the tags from the example file, I get no error but no new users either. I think this has something to do with the fact that Excel saves CSV files differently in Europe, separating lines with a semi colon instead of a comma. I already had a look in import-users-from-csv.php, but couldn’t find anything that I could change into semi colon. Care to help me out?
    Thanks!

    https://www.ads-software.com/extend/plugins/import-users-from-csv/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Contributor Ulrich Sossou

    (@sorich87)

    You can use the following solution:

    – Close Excel
    – Click Start
    – Click Settings
    – Click Control Panel
    – Click Regional and Language Options
    – Click on Customize
    – Make sure the “Decimal symbol” is a period and change it to that if not
    – If the “List separator” is a semicolon (;) then change it to a comma
    – Run Excel and save the file as a CSV file

    Source: https://answers.google.com/answers/threadview/id/555457.html

    Or you can change line 80 in the plugin file from $rows[] = fgetcsv( $file_handle, 1024 ); to $rows[] = fgetcsv( $file_handle, 1024, ';' );.

    I’m getting that same error, and I confirmed my language settings are set to use . and , for decimal and list separator. I wonder if it has something to do with the fact that I first tried to import CSV files with incorrect header labels. Before I looked at your sample file, I tried to import a CSV with headers like, “login” “First Name”, etc. and got an error. Now I get that error, but the users are successfully imported anyway.

    Thanks for a great plugin, but it would be great if I could get rid of that error message.

    Plugin Contributor Ulrich Sossou

    (@sorich87)

    Thanks for your feedback @thesalmon. It will be fixed in the next version.

    You’re welcome. Great plug in! After reading the threads to understand how it works, I was able to look up the meta labels for a custom registration form I built using the WP-Members plugin, and now when I put that custom meta data in my csv it all imports beautifully. Thank you.

    I’m getting exactly the same error as @mirte. I’ve tried importing the import.csv file that came with the plugin which is comma separated but I get the same error. It appears to import those two users but then I tried to import a csv file based on exactly the same content as the test csv file and whilst I don’t get an error I also do not get any users imported.

    Arhh, hold on. I’ve figured out the issue I was having. On a Mac you need to save as a “Windows Comma Separated” file and not the standard CSV file. Just tried that and it imports and sends the user email correctly.

    To follow up on an earlier post…everything imports beautifully IF you have no commas in your questions and the user doesn’t use any commas or hard returns in their responses. The commas in my questions and the responses are adding to the COMMA separated data so the import gets very messy.

    Is there a way to export the data tab separated instead of comma separated? Thanks.

    I solved it. Thanks for the well commented code. In the wp-members-export file I changed all the commas to semi-colons and then using Ulrich’s directions above, I set my list separator to a semi-colon. The data opens up in Excel looking good now! (but I still need my users to NOT use hard return in text boxes!)

    Plugin Contributor Ulrich Sossou

    (@sorich87)

    @thesalmon, I think if there are double quotes around each field (as in the example file) or at least the ones with the hard returns, hard returns will not affect the import.

    Unfortunately with 3.3.1 I can’t even get the sample file to import. I have tried everything, even just using a plain text editor to make sure the files are in the right format. I get the same invalid argument error. Cannot figure this one out as I’m even using the same file. I kept it as is and also edited out the last two fields properly, no luck. Must be something small that is a problem.

    @thelaw:
    Does it import the users though it shows the error? (Check for the janedoe and the johndoe examples in your user list)
    I also receive the invalid errors with the example file but the import works nevertheless. With my own csv files it works fine and without any errors… (as long as I stick to certain rules: don’t use passwords that are in use already and you have to use certain fields like user_login)
    Good luck ??

    @nuttynuts – Thanks for your response. ??

    (1) It doesn’t import any users at all, doesn’t matter what browser. I’m going to try a few different text editors.

    (2) Password – I’ve found something that properly salts the passwords. This one does not? Not sure but it would seem that it doesn’t.

    (3) Fields – I stuck with just the basics and couldn’t get it to work at all. Another CSV plugin works like a charm but only for four basic fields. This one has more flexibility, just seems like it is extremely finnicky as to format. What concerns me is that even the sample CSV file didn’t work so I wonder what could be causing the error. I’ll do more testing tonight and report back.

    Thanks again. ??

    I’ve had about 60 people register using my WP-Members form, and I did not activate them yet. I also filled out the registration myself, not with my admin email address. Tonight I got the “you are approved” email even though I didn’t activate anyone. When I went to look at my list of users in the admin panel, the “Activated?” column is empty, it doesn’t say Yes or No, it’s just empty. When I look at the data for a single user the “Activated?” field is not showing at all.

    When I sort by “not activated” no users are in the list. I think the plug-in got buggy and activated everyone, and now I can’t de-activate them. Has anyone ever seen that or know how to fix it? Thanks.

    nuttynuts – you are *right* – it actually did do the import in spite of the error but the users did not appear throughout the multisite. I’m still going to try to use another tool for the moment.

    thesalmon – Not sure what happened by you but why not use a mysql query to properly set the field for all the users at once?

    Plugin Contributor Ulrich Sossou

    (@sorich87)

    @thesalmon: The Import User from CSV plugin will run only when you upload a CSV file. It will not run everytime a user registers to your site. So the issue you are having is not related to it. You should create a new forum topic about WP-Members.

    @thelaw: Can you look into the users list in Network Admin? Maybe the users got added but where not assigned any role… Let me know so that I can troubleshoot that.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: Import Users from CSV] Error when importing example file’ is closed to new replies.