When attempting a import I am getting the following error message:
Error: An error has occurred. - Length cannot be less than zero. Parameter name: length
I think it maybe because the dictionary uSync config files are not containing any child nodes as they have been created for many languages but have no content yet.
No it doesn't, but it certainly is this, a dictionary item without any content in any language, adding content into at least one language of every item is a workaround.
Darn, that is exactly what I've been seeing and ensuring all the languages were there as child nodes in the config file did get the "Report" to work properly, I didn't actually try to "Import"...
When you call report, it doesn't actually call any of the import stuff, it actually does an export (if anything exists) as it creates an XML version of what is in umbraco and compares it to the XML from disk.
None of that seems like it might cause this, but it's possible the dictionary items aren't in properly (from their first import) and this is triggering something.
if you get a chance can you put debug logging on for uSync (in the log4net.config)
This does seem to be fixed in the latest version, thanks!
I think there maybe an issue with the "details" display for languages, it often seems to show the wrong culture, we will have a look at this.
But could you clarify the process for importing dictionary items in terms of which content is taken if the content in Umbraco differs to the content in the uSync import file?
I will have a look at details, the way it displays changes is slightly different than how they are applied (it's looking at xml, and trying to find changes, the actual import process does it against the db).
the default uSync behavior for dictionary items is to bring everything it can in from the sync files, that means new things are imports, existing things overwritten and missing values should be removed.
Dictionary exports contain all the children of an entry in one file, so they are imported based on the parent (but they should still notice changes in and sort out children)
Error: An error has occurred. - Length cannot be less than zero. Parameter name: length
Umbraco v7.4.3 uSync v3.1.4.740 uSync.Core v5.3.5.740
When attempting a import I am getting the following error message:
I think it maybe because the dictionary uSync config files are not containing any child nodes as they have been created for many languages but have no content yet.
For example:
But it should be more like:
Still investigating, anyone else seen this happen?
Jeavon
hi
is there anything in the umbracotracelog ?
No it doesn't, but it certainly is this, a dictionary item without any content in any language, adding content into at least one language of every item is a workaround.
Hi
Struggling to reproduce this :(
I've create dictionary empty dictionary items, export and imported them, deleted them and imported new ones. all with no values in the xml
the dictionary code is here : https://github.com/KevinJump/uSync/blob/Dev-v7_4/Jumoo.uSync.Core/Serializers/DictionarySerializer.cs#L42 nothing has changed in the serializer for a while :(
Still playing around with it, to see if i can get it to trigger somehow.
Darn, that is exactly what I've been seeing and ensuring all the languages were there as child nodes in the config file did get the "Report" to work properly, I didn't actually try to "Import"...
Humm
When you call report, it doesn't actually call any of the import stuff, it actually does an export (if anything exists) as it creates an XML version of what is in umbraco and compares it to the XML from disk.
this means it could be failing on Serialize ( https://github.com/umbraco/Umbraco-CMS/blob/75c2b07ad3a093b5b65b6ebd45697687c062f62a/src/Umbraco.Core/Services/PackagingService.cs#L1101 )
Which in turn calls the umbraco package service to get the xml (which in turn calls the EnitiyXMLService - https://github.com/umbraco/Umbraco-CMS/blame/75c2b07ad3a093b5b65b6ebd45697687c062f62a/src/Umbraco.Core/Services/EntityXmlSerializer.cs#L184)
None of that seems like it might cause this, but it's possible the dictionary items aren't in properly (from their first import) and this is triggering something.
if you get a chance can you put debug logging on for uSync (in the log4net.config)
and see if that gives us any more information.
K
Hi Kevin,
This does seem to be fixed in the latest version, thanks!
I think there maybe an issue with the "details" display for languages, it often seems to show the wrong culture, we will have a look at this.
But could you clarify the process for importing dictionary items in terms of which content is taken if the content in Umbraco differs to the content in the uSync import file?
Thanks,
Jeavon
Cool,
I will have a look at details, the way it displays changes is slightly different than how they are applied (it's looking at xml, and trying to find changes, the actual import process does it against the db).
the default uSync behavior for dictionary items is to bring everything it can in from the sync files, that means new things are imports, existing things overwritten and missing values should be removed.
Dictionary exports contain all the children of an entry in one file, so they are imported based on the parent (but they should still notice changes in and sort out children)
A couple of people have written diffrent dictionary handlers to do change only syncs https://github.com/KevinJump/uSync/issues/26 if you don't want uSync to be so aggressive.
I am slowly adding things to usync that will allow us to put more options like this into all handlers.
Kevin,
is working on a reply...