Importing csv UTF8 User fields does not accept the first field name

5 years 5 months ago #262463 by Ake66

I have tried everything I can think of.
But, when I do everything "right" (in my mind), with a minimum set of variables, I still get the following persistent error.

CB Version =2.0
Array ( [0] => "username" [1] => email [2] => registerDate [3] => name [4] => firstname [5] => lastname [6] => usertype )

"username" is not valid
Terminating because of undefined header variables

I have tried swapping field order (between name and username), but whichever is written first is determined "not valid". It is odd the the double quotes do not get stripped from the field name "username".
I tried removing the double quotes from the "username", but that only results in...

username is not valid ; instead

I have done everything I can to ensure that no odd characters are saved, including verifying the text in Word (with "show hidden" chars on) and saving as UTF8 text from Notepad, as well as Libreoffice.

If I do not save as UTF8, I can get the data in (but with lots of odd errors due to the many umlauts in Scandinavian names).

But when I save as UTF8 the first field name is always declared "invalid".

Any ideas, anybody?? (I run on (PHP 5.6 extension mysqli and MariaDB 5.5.2) using the latest versions of Joomla, CB and CBJuice downloaded a few days ago)

Please Log in to join the conversation.

5 years 5 months ago #262465 by wolverton
We've seen this one before.
Using Notepad++, under Encoding, convert file to "utf-8 without bom" and save, then try importing again.
The following user(s) said Thank You: 3cellhosting

Please Log in to join the conversation.

5 years 5 months ago - 5 years 5 months ago #262470 by Ake66
Thank you Wolverton,

Getting rid of the "Bom" (whatever that is) did it.

Note1: I tried to load email="" but it was substituded with something like
It was created from a last name with Scandinavian characters, which was not accepted as a valid email adress.
I had to create my own invalid adresses using the UserName (which often are based on a-z characters only)
Imho it makes more sense to create the phony email from the username (or make sure umlauts are converted to non-umlauts)

Is the string "WQsUFsFX" really needed to uniquify the email adress (or was it a result of the Scandinavian character in the lastname).

Note2: I input a RegisterDate with the time set to 11:11:11, but that was somehow converted to 14:11:11 (a bit odd, considering Sweden normally is GMT+1)

Note3: If it would have been possible for CBJuice2 to strip that "Bom" by itself, it would have saved me a lot of time.

Apart from that, everything worked as expected. Thanks again for your help.

Please Log in to join the conversation.

5 years 5 months ago #262474 by wolverton
  1. To use the username would require coding changes. We receive no income from our programming work on CBJuice2, but can make custom modifications if you are willing to pay.
  2. Export the users and look at how the date is formatted. It will likely be YYYY-MM-DD
  3. We might consider looking at code to strip BOM

Please Log in to join the conversation.

Moderators: beatnantjciconsultwolvertonkrileon
Time to create page: 0.388 seconds

Facebook Twitter LinkedIn