• Jairo Ochoa

    (@jairoochoa)


    Hi,

    I do import from CSV but I found a bug when there is a comma inside “description” column.
    For instance “My name is John and I like cars, music and traveling”.
    As you can see the description is inside double quote but it even fails.

    This is the header:
    “last_name”,”first_name”,”description”,”user_login”,”user_nicename”,”user_pass”,”user_email”,”display_name”,”nickname”,”user_registered”,”role”,”rich_editing”,”comment_shortcuts”,”admin_color”,”use_ssl”,”show_admin_bar_front”

    Thanks.

    https://www.ads-software.com/plugins/members-import/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I got the same problem. Is there a way to escape commas or to use different field separators for the import?

    I had the same problem.

    The solution i used will only work for php >= 5.3.0

    You need to comment out line 73 and 74 in members-import.php :

    // split into values
    //$arr_values = str_replace('"', '', $row);
    //$arr_values = split(",", $arr_values);

    and add this line :
    $arr_values = str_getcsv($row, ',', '"', '\\');

    Thread Starter Jairo Ochoa

    (@jairoochoa)

    Thanks!

    I hope this fix soon to be included into last version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘description field bug when contains a comma’ is closed to new replies.