I have a content type in Umbraco that includes the new Mutliple Text Box field. This Umbraco Content Type is assigned as a Product Content type in Merchello. I also have 2 languages.
When I edit a product in Merchello I clicked on the "Extended Data" ta to edit the data in the Multiple Text Box control. I can choose the language using the language selector in the top right.
The Multiple Data Text box is correctly saved as JSON in the Detached Content Values but only for the currently selected language. If I change the language and add data and save, this multiple text box data saves correctly for the current language, but the data for the initial language becomes corrupted. The data is still there in the json but it is prefexid by a new JSON array.
I have breakpoints in merchello.controllers.js and can see the corrupt data so believe this is an issue with the angular data binding but I am not sure where to look now to try to fix this. Any pointers appreciated.
The 2 screenshots attached show a new product created in German with strings "Tom", "Dick" and "Harry". Immediately after saving, the language display is changed to US English and the value on display is [].
After saving the US product making no changes, the German text strings value is saved as raw JSON.
I shall take some more screenshots now of the debugger to show how the values change when editted.
After a few saves of knife, fork and spoon in German, we can see in the watch window the German version (the currently displayed language) is correct, but the US version has grown very long.
It may be that the controller is only treating the value from the current language as an editor value and the other values are getting serialized (again) as a JSON string - even though they had already been previously stored correctly.
If that assessment is correct, the issue may be in the ProductVariantDetachedContentHelper or the DetachedValuesConverter (which is used by the ProductVariantDetachedContentHelper).
This one is still an open issue - I've already spent a couple of hours trying to fix it, but it's proving not to be a quick fix. The issue stems from the serialization / deserialization or the string stored in the detached content values collection to JSON when multiple cultures are present.
The MultiTextString editor is a sort of an oddity in the way it saves data delineated by carriage returns and there we had to do a correction to present it properly to the front end as well.
Multiple Text Box corrupts json in DetachedDataValues
I have a content type in Umbraco that includes the new Mutliple Text Box field. This Umbraco Content Type is assigned as a Product Content type in Merchello. I also have 2 languages.
When I edit a product in Merchello I clicked on the "Extended Data" ta to edit the data in the Multiple Text Box control. I can choose the language using the language selector in the top right.
The Multiple Data Text box is correctly saved as JSON in the Detached Content Values but only for the currently selected language. If I change the language and add data and save, this multiple text box data saves correctly for the current language, but the data for the initial language becomes corrupted. The data is still there in the json but it is prefexid by a new JSON array.
I have breakpoints in merchello.controllers.js and can see the corrupt data so believe this is an issue with the angular data binding but I am not sure where to look now to try to fix this. Any pointers appreciated.
Hi Kevin,
Are you catching the value (in Angular) on the post or in the response?
Can you post an example of the value you're seeing?
The control is actually "Repeatable textstrings".
The 2 screenshots attached show a new product created in German with strings "Tom", "Dick" and "Harry". Immediately after saving, the language display is changed to US English and the value on display is [].
After saving the US product making no changes, the German text strings value is saved as raw JSON.
I shall take some more screenshots now of the debugger to show how the values change when editted.
After a few saves of knife, fork and spoon in German, we can see in the watch window the German version (the currently displayed language) is correct, but the US version has grown very long.
Kevin,
It may be that the controller is only treating the value from the current language as an editor value and the other values are getting serialized (again) as a JSON string - even though they had already been previously stored correctly.
If that assessment is correct, the issue may be in the
ProductVariantDetachedContentHelper
or theDetachedValuesConverter
(which is used by the ProductVariantDetachedContentHelper).https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Models/ContentEditing/Content/ProductVariantDetachedContentHelper.cs#L30
We should write up an issue in the issue tracker (http://issues.merchello.com) so we can track this one ... I'll try to replicate this issue as well.
Thanks Rusty,
I will dig deeper. I have raised issue M-1251.
Hi, also have this problem. Is there a fix version?
This one is still an open issue - I've already spent a couple of hours trying to fix it, but it's proving not to be a quick fix. The issue stems from the serialization / deserialization or the string stored in the detached content values collection to JSON when multiple cultures are present.
The MultiTextString editor is a sort of an oddity in the way it saves data delineated by carriage returns and there we had to do a correction to present it properly to the front end as well.
is working on a reply...