When setting up variants, the datatype persists values to the dataNvarchar field in cmsPropertyData. In Umbraco 7.15 this is limited to 500 chars, and if you have a lot of variants, bugs out quickly due to a LOT of whitespace being inserted.
Two suggestions:
persist to dataNtext instead
apply whitespace minification upon serialization
One variant on one product yields the following JSON in my cmsPropertyData table, and whilst I've manually upped the char limit on the column to be nvarchar(MAX), it is far from an ideal solution.
I think would could probably look to see if we can explicitly choose NText but we'd probably need to a) review if this had any issues with the data but also b) ensure there is an upgrade path such that existing values get copied across.
Bug in data truncation on cmsPropertyData
When setting up variants, the datatype persists values to the dataNvarchar field in cmsPropertyData. In Umbraco 7.15 this is limited to 500 chars, and if you have a lot of variants, bugs out quickly due to a LOT of whitespace being inserted.
Two suggestions:
One variant on one product yields the following JSON in my cmsPropertyData table, and whilst I've manually upped the char limit on the column to be nvarchar(MAX), it is far from an ideal solution.
Hi Benjamin,
You're on fire today 😁
That is one I have seen before and I have recommended people change the column def to nvarchar(MAX) as a workaround. Essentially I think it's more of a core issue as the prop editor just declares it's value type as JSON https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/master/Source/TeaCommerce.Umbraco.Configuration/PropertyEditors/VariantEditorPropertyEditor.cs#L12 but Umbraco appears to store that in the nvarchar field. I also can't quite recall if there was a period in time when the col used to be nvarchar(MAX) but was lowered, but I can't be sure on that one.
I think would could probably look to see if we can explicitly choose NText but we'd probably need to a) review if this had any issues with the data but also b) ensure there is an upgrade path such that existing values get copied across.
is working on a reply...