-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal Error - Fails to parse csv when duplicate record in imported csv . #35
Comments
Is this something you'd be happy to investigate? |
@jcop007 there is a unique database index on those two columns. It makes sense to limit it so there's only one pair of FromBase and FromQueryString. If there was more combinations, how would you decide which destination to choose to redirect to? |
@michalkleiner Yes, that's true. My main issue was that it took use many hours to figure out what was causing the error and then which row in the spreadsheet was responsible. If the error message could display that information it would be very helpful. |
hmm, that is an unhelpful error if the real problem is a duplicate unique index - anyone prepared to patch it? |
I've just tested this against the 4.x compatible line (master) and it is no longer an issue. @jcop007 do you have a fix for the 3.x compatible (1) line? |
@stevie-mayhew No, we didn't write a fix. We just removed duplicates once we figured out that was the issue. I'll take another look and see if we can get a fix for it. |
@stevie-mayhew @dhensby Here is a PR #59 for this issue. Could someone please review? |
Hi
We're importing a csv with cols 'FromBase','FromQuerystring','To'
If any of the rows are not unique across the two cols 'FromBase' & 'FromQuerystring' it will throw a fatal error.
Failed to parse C:\WINDOWS\TEMP\silverstripe-cache-php5.5.12C--wamp-www-enjoyillinoiscom\JONATHAN-4/BulkLoader589cbd0d829a31.37719436.csv
Fatal error: Call to a member function CreatedCount() on a non-object in C:\wamp\www\enjoyillinoiscom\framework\admin\code\ModelAdmin.php on line 445
Thanks
The text was updated successfully, but these errors were encountered: