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.
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.
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.
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.
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?
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 )
Hi Vincent,
Quick Q. what is the datatype you map against? I'll see what happens when I run in debug mode.
Thanks,
Richard
Richard,
It's a plain and simple textstring
Are you sure, aliasobjectGeoLocation doesn't sound simple ;-)?
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)
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
Richard,
You're right. We tried ignoring the property and then we got an error on the then last property.
Hi Vincent,
Would it be possible to export the document type you are using and send it to me [email protected].
Thanks,
Richard
Richard,
Sure sendig them now
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
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.
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
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>
is working on a reply...