Copied to clipboard

Flag this post as spam?

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


  • Vincent Baaij 95 posts 344 karma points c-trib
    Jul 08, 2013 @ 21:34
    Vincent Baaij
    0

    Import error on 6.1.2

    When importing an xml file, were getting the following error on all records:

    Error while importing data for property 'objectXXXX', datasource record ObjectName = 'AAAAAAA', Error :Input string was not in a correct format. 

     

    The property is empty in the xml source. If I interpret the log correctly, its trying to make a number of the (empty string). Below I've included the relevant part of the log.

    I'm running the latest CMS Import (2.3.3)  and Umbraco (6.1.2) versions

     

    Appreciate the help.

    From the log:

    2013-07-08 21:20:50,610 [44] INFO  umbraco.BusinessLogic.Log - [Thread 44] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: 0 | Comment: CMSImport: A record failed to import for aliasobjectGeoLocation error:System.FormatException: Input string was not in a correct format.

       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

       at Umbraco.Core.Persistence.Factories.PropertyFactory.BuildDto(IEnumerable`1 properties)

       at Umbraco.Core.Persistence.Repositories.ContentRepository.PersistUpdatedItem(IContent entity)

       at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistUpdatedItem(IEntity entity)

       at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit()

       at Umbraco.Core.Services.ContentService.Save(IContent content, Boolean changeState, Int32 userId, Boolean raiseEvents)

       at Umbraco.Core.Services.ContentService.Save(IContent content, Int32 userId, Boolean raiseEvents)

       at umbraco.cms.businesslogic.web.Document.Save()

     

       at CMSImportLibrary.Import.ContentImporter.(ImportState , User , ImportStatistics , String , Int32 , String )

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 09, 2013 @ 07:42
    Richard Soeteman
    0

    Hi Vincent,

    Quick Q. what is the datatype you map against? I'll see what happens when I run in debug mode.

    Thanks,

    Richard

     

  • Vincent Baaij 95 posts 344 karma points c-trib
    Jul 09, 2013 @ 09:15
    Vincent Baaij
    0

    Richard,

     

    It's a plain and simple textstring

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 09, 2013 @ 19:54
    Richard Soeteman
    0

    Are you sure, aliasobjectGeoLocation doesn't sound simple ;-)?

     

  • Vincent Baaij 95 posts 344 karma points c-trib
    Jul 09, 2013 @ 22:37
    Vincent Baaij
    0

    Yes I'm sure. The object at the exporting side is complex. It is output to the xml as string (which is empty 99 out of 100 times)

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 11, 2013 @ 09:04
    Richard Soeteman
    0

    Hi Vincent,

    is the objectXXXX (aliasobjectGeoLocation) the last property in the mapping? In case yes, I guess it's because of  the change to the new Datalayer. In the old datalayer you got feedback after assigning the property value. When an error occured it was always the latest property that caused the error so that would be reported. In case of V6 all properties gets saved in one batch so the reported property is always the latest. I will check how to solve this, or how I can get the correct property again.

    Hope to have an update early next week.

    Thanks,

    Richard

     

  • Vincent Baaij 95 posts 344 karma points c-trib
    Jul 11, 2013 @ 09:23
    Vincent Baaij
    0

    Richard,

    You're right. We tried ignoring the property and then we got an error on the then last property.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 15, 2013 @ 07:06
    Richard Soeteman
    0

    Hi Vincent,

    Would it be possible to export the document type you are using and send it to me [email protected].

    Thanks,

    Richard

  • Vincent Baaij 95 posts 344 karma points c-trib
    Jul 15, 2013 @ 09:17
    Vincent Baaij
    0

    Richard,

     

    Sure sendig them now

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 21, 2013 @ 14:04
    Richard Soeteman
    0

    Hi Vincent,

    You've already used it and to others sorry for the delay on this but I've just released version 2.4 of CMSImport which validates data before assigning it to the Umbraco document type. This means validation works again as expected and fields containing an error are displayed correctly.

    Hope this helps,

    Richard

  • Jan Vanuytrecht 32 posts 80 karma points
    Sep 11, 2014 @ 14:06
    Jan Vanuytrecht
    0

    We have quite the same problem.

    Working with Umbraco 4.11 though, and CMSImport PRO 2.4 

    We get a error message on the last mapped property.

    Any idea how we could debug/solve this issue? Of course this only occurs on production and we cannot reproduce this on our test servers or on a local machine. 

    Always happens on random items (which had no issue on the import that happened before).

    Also, it seems that he maps a certain field to the wrong property.

    Any help is very welcome, this has been bugging us for quite a while now.

     

     

     

     

     

     

     

     

     

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 11, 2014 @ 14:15
    Richard Soeteman
    0

    Hi Jan,

    On 4.11 the correct field should be displayed since save occurs immediately after setting the value. Weird that you don't have this issue in other environments, sure you are using the same data?

    Details of the error are logged, maybe that tells you more what went wrong?

    Best,

    Richard

  • Jan Vanuytrecht 32 posts 80 karma points
    Sep 11, 2014 @ 14:22
    Jan Vanuytrecht
    0

    Hi Richard,

     

    Thanks for your fast reply.

    Yes we double checked and are using the same data.

     

    Our Log4net config looks like this, but we cannot find any errors in the Logfile:

     <?xml version="1.0"?>

    <log4net>

    <root>

    <priority value="Info"/>

    <appender-ref ref="AsynchronousLog4NetAppender" />

    </root>

     

     

    <!--To Change the way logging works for certain namespaces, insert a new logger like: -->

    <!--

    <logger name="Umbraco.Core">

    <level value="WARN" />

    </logger>-->

     

    <appender name="AsynchronousLog4NetAppender" type="Umbraco.Core.Logging.AsynchronousRollingFileAppender, Umbraco.Core">

    <file value="App_Data\Logs\UmbracoTraceLog.txt" />

    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />

    <appendToFile value="true" />

    <rollingStyle value="Date" />

    <maximumFileSize value="5MB" />

    <layout type="log4net.Layout.PatternLayout">

    <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />

    </layout>

    </appender>

    </log4net>

Please Sign in or register to post replies

Write your reply to:

Draft