error with Import members spreadsheet

Post

Posted
Rating:
#4906 (In Topic #990)
I am finally going live today, and have previously and sucesfully imported members using the member CSV import facility.

However using the recommended approach, I downloaded the members database, and simply changed Validated from "No" to "Yes", and the system errors as follows

Database query failed: UPDATE cms_f_members SET (removed for security) [Data too long for column 'm_password_compat_scheme' at row 1]

The members validation status is still left as Off

I have also tried removing the password column from the CSV file, and setting the default password, but the same error occurs

However if i set the Password column in plain text then it imports correctly without the error message.

I think there may be a bug here.

Thanks
Chris

 

Last edit: by Chris Graham

Post

Posted
Rating:
#4907
Hi,

I believe this one has been fixed some time ago.

Post

Posted
Rating:
#4908
Hi chris.
Could you give me any pointers on the file involved.

Couldn't see anything obvious in the tracker?

Thanks
Chris

Post

Posted
Rating:
#4909
Taking a look.

Post

Posted
Rating:
#4910
Change to sources/hooks/systems/tasks/import_member_csv.php and sources/hooks/systems/tasks/download_member_csv.php in:

https://github.com/ocproducts/composr/commit/2991840534417e3cbd58da13900ba1382994bad6#diff-9db9f7484e08c321685fa3924e4085fa

I think I discovered it myself, when I happened to come across a password hash that had a slash in.

Post

Posted
Rating:
#4913
Hi chris.
All a bit odd. The line in git as changed is different. Mine  reads
$parts = preg_split('#\s*/\s*#', $line['Password'], 3);

Up to going custom around 10.15 I was keeping up to date with updates so not sure why this is wrong.

I'll try updating and try again.

Post

Posted
Rating:
#4915
Go with $parts = explode(' / ', $line['Password'], 3);, you actually avoided a future bug  by noticing this.

Because of your version's changes involving member account changes, a lot of files touching member accounts had to be changed.

Post

Posted
Rating:
#4920
Thanks chris.

That resolved it
Chris
2 guests and 0 members have recently viewed this.