We have a simple CSV file that we import users from with the following schema:
Password;RegistrationNo;EmailAddress;Name
Which are mapped as may be expected:
Password;Username;Email;FullName
This all works as required with two exceptions:
Most importantly, attempting to delete any user imported via CMSImport fails with a null reference exception. There is nothing in the log indicating what the error is. In contrast, there is no issue deleting a member that was created via the Umbraco backend. We can use a package such as the Blackpool Member Admin to bulk delete users however (regardless of whether created via import or via Umbraco backend).
If there is a duplicate email, it just imports with a duplicate email address (whereas if creating a member from within Umbraco, this fails with a "duplicate email" exception).
I have looked at the membership table etc. and there does not appear to be any difference between how data is stored between a CMSImport'ed member and a regularly created Member.
Maybe its because of the duplicate email address Whenever Umbraco validates soemthing it's validated on UI instead of the actual Member Object since I map directly against the member type it will not get validated. Will add validation for this in a future release.
Maybe it's worth to check what happens if you only import unique records, two is enough. Can you delete then?
In addition, it's a server-side exception, not a client-side exception. Attempt to delete and error "toast" popup in the bottom right pops up with minimal message stating that request couldn't be processed because of null reference exception. Again, not logged anywhere.
Does the member login name consist of all digits? If so there is a known bug in Umbraco with deleting them.
If not, try running Fiddler while you try to delete the member, you should be able to get the full StackTrace from the ajax call and see the "real" error.
You nailed it - thanks for noticing this post and providing the answer. And great tip on using fiddler to get the full stack trace - will keep that in mind for any future exception issues where the real exception gets swallowed otherwise in an Umbraco backoffice AJAX call.
Unable to delete member created with CMSImport
We have purchased a site license for CMSImport.
Umbraco 4.7.1 ASP.NET 4.0
We have a simple CSV file that we import users from with the following schema:
Password;RegistrationNo;EmailAddress;Name
Which are mapped as may be expected:
Password;Username;Email;FullName
This all works as required with two exceptions:
I have looked at the membership table etc. and there does not appear to be any difference between how data is stored between a CMSImport'ed member and a regularly created Member.
Hi Ted,
Maybe its because of the duplicate email address Whenever Umbraco validates soemthing it's validated on UI instead of the actual Member Object since I map directly against the member type it will not get validated. Will add validation for this in a future release.
Maybe it's worth to check what happens if you only import unique records, two is enough. Can you delete then?
Cheers,
Richard
Thought of that previously, but no luck. Even with no duplicate emails it still fails with the null reference exception.
Ted
Thought of that previously, but no luck. Even with no duplicate emails it still fails with the null reference exception.
Ted
In addition, it's a server-side exception, not a client-side exception. Attempt to delete and error "toast" popup in the bottom right pops up with minimal message stating that request couldn't be processed because of null reference exception. Again, not logged anywhere.
Ted
Sorry to say but I have the exact environment and tried the same but deleting still worked. I am using cmsimport 2.1 what version are you on?
cmsimport 2.1 as well. Baffling. And unfortunately no way for me to see how to debug.
Hi Ted,
Does the member login name consist of all digits? If so there is a known bug in Umbraco with deleting them.
If not, try running Fiddler while you try to delete the member, you should be able to get the full StackTrace from the ajax call and see the "real" error.
Hope this helps,
Tom
Tom,
You nailed it - thanks for noticing this post and providing the answer. And great tip on using fiddler to get the full stack trace - will keep that in mind for any future exception issues where the real exception gets swallowed otherwise in an Umbraco backoffice AJAX call.
Ted
Thanks Tom,
Was out of options on this one.
Thanks,
Richard
is working on a reply...