Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1250 posts 3745 karma points admin c-trib
    Oct 18, 2012 @ 11:49
    Dan
    0

    How to identify erroring CMSImport items

    Hi,

    I've run a fairly large import and have 28 failed items - pretty reasonable considering the state of the data, so kudos to CMSImport!  However, the error messages for these 28 items don't allow me to identify which lines of data are the problem ones.  e.g. The first three errors are:

    Error while importing data for property 'price' :Conversion failed when converting the nvarchar value ' ' to data type int. 
    Error while importing data for property 'price' :Conversion failed when converting the nvarchar value ' ' to data type int. 
    Error while importing data for property 'price' :Conversion failed when converting the nvarchar value ' ' to data type int. 

    It would be really handy to have a list of the titles of these failed nodes, or the line numbers in the source data, to be able to identify the failures and manually correct them.

    Is there a way to do this?  I've looked at the umbraco log table in the database and that flags up the items but doesn't provide any useful way - as far as I can see - to identify them.

     

  • rich hamilton 117 posts 136 karma points
    Oct 18, 2012 @ 12:12
    rich hamilton
    0

    I agree, you need to know which ones error so that you can rectify or you will end up with incomplete data.

    Also it is not enough to say 20 records skipped? Need to know which ones and why.

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Oct 18, 2012 @ 12:30
    Richard Soeteman
    2

    Hey Guys,

    I'll try to include some more info about the record that went wrong in a next release. This will only include the id if you specified a primary key .  Then you will know which record has failed. The documents will be removed after the import failed (if it was imported for the first time)

    The explanation is already in the errormessage here "Conversion failed when converting the nvarchar value ' ' to data type int". This tells me that a price record contains a single space which isn't a number.

    The record skipped functionality only kicks in when a duplicate is found and you selected skip import instead of update records. So either the record was already imported or you have duplicate id's in the datasource

    Hope it helps for now

    Cheers,

    Richard

  • rich hamilton 117 posts 136 karma points
    Oct 18, 2012 @ 12:33
    rich hamilton
    0

    ok, thanks for the reply.... I also noticed that it said that a field could be trunctaed, but rather have a truncated field than a missing record.

  • Dan 1250 posts 3745 karma points admin c-trib
    Oct 18, 2012 @ 12:36
    Dan
    0

    Thanks Richard.  It'd be mega-helpful in this scenario to have the primary key returned in the error, so consider that a feature request, or at least a +1 if it's already on the cards.

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Oct 18, 2012 @ 12:41
    Richard Soeteman
    0

    It will be implemented in the next release, for now Sorry....

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 07, 2012 @ 13:17
    Richard Soeteman
    1

    Hi Guys,

    Working on the new 2.3 release now. The id is not available on every import, to keep things consistent I report the title/login column and value from he Datasource so that must be pretty easy to find.. Below some screenshots, what do you think, will this help?

    Content import

    Member  import

    Thanks,

    Richard

     

     

  • Dan 1250 posts 3745 karma points admin c-trib
    Dec 07, 2012 @ 13:46
    Dan
    0

    Looks good to me Richard!

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 07, 2012 @ 13:53
    Richard Soeteman
    0

    Thanks Dan,

    Just checked in the code so it will be in the next release for sure.

    Thanks,

    Richard

  • Dan 1250 posts 3745 karma points admin c-trib
    Dec 07, 2012 @ 13:56
    Dan
    0

    Brilliant!  A great product just got even better. #h5yr!

  • rich hamilton 117 posts 136 karma points
    Dec 11, 2012 @ 08:30
    rich hamilton
    0

    That is great, but what about skipped records?

    If I import a whole load of records I currently have to guess which ones are skipped and don't know the reason why.

    Thanks

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 11, 2012 @ 10:36
    Richard Soeteman
    0

    Hi Rich,

    Valid point. A record is only skipped when you choose skip records already imported, instead of updating records.This is based on the selected primary key. And for members it's the login name. In some cases it could be that 1000+ items are being skipped. You don't want to have that in the overview. Otherwise you might want to have the updated records also. I will update the description to make this more clear.

    Thanks,

    Richard

  • rich hamilton 117 posts 136 karma points
    Dec 11, 2012 @ 10:47
    rich hamilton
    0

    Hi, I understand that if a record is already imported and you have said 'do not update' it will skip it.

    But I mean if the parent key is incorrect, I needed to go back and match them up again without knowing which ones didn't match.

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 11, 2012 @ 10:55
    Richard Soeteman
    0

    What I can do is add an entry in the Umbraco Log table with the id, will that help you?

  • rich hamilton 117 posts 136 karma points
    Dec 11, 2012 @ 10:57
    rich hamilton
    0

    That would be good, yes. Just some way of tracing it without having to trawl though the import data

    Many Thanks, good work. :-)

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 11, 2012 @ 13:52
    Richard Soeteman
    0

    Hi Rich,

    Since I have your attention. This is what I'm planning to log in case of skipped records:

    CMSImport: Record skipped Primary key 'Id', primary key value '3'

    Will that help you?

    Thanks,

    Richard

  • Richard Soeteman 3759 posts 11667 karma points MVP
    Dec 11, 2012 @ 16:24
    Richard Soeteman
    0

    Had some time to implement this .

    When records are skipped it will be reported in the result screen. I've added a message that the details can be found in the log table of the Umbraco database

    The following info will be logged when a content record is skipped

    And when a member record is skipped the following info is logged

    This will be in the 2.3 release of CMSImport (Pro)

    Best,

    Richard

  • rich hamilton 117 posts 136 karma points
    Dec 11, 2012 @ 16:25
    rich hamilton
    0

    Thanks Richard, look forward to it.

Please Sign in or register to post replies

Write your reply to:

Draft