I have a metafield of type "Short String" - in the database I see it has max length of 512.
So, we have imported data into this metafield which is 512 characters long.
But when I use IContentLoader to load a product containing that metafield, it is mapped to an EPiServer.Core.PropertyString which has a max length of 255... so, this exception is thrown:
Message: EPiServer.Core.InvalidPropertyValueException: "TechArticleLinks" has exceeded its limit of 255 characters.
at EPiServer.Core.PropertyString.set_String(String value)
at EPiServer.Core.PropertyData.SetPropertyValue(Object value, SetPropertyValueDelegate doSet)
at EPiServer.Commerce.Catalog.Provider.MetaDataPropertyMapper.AssignMetaFieldValueToProperty(PropertyData property, Object metaFieldValue, MetaDataType metaDataType, String blockPropertyMetaFieldName)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogPropertyLoader.AddMetaDataAttributePropertyValues(MetaObjectAccessor accessor, CatalogContentBase content)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogPropertyLoader.LoadProperties(CatalogEntryRow entryRow, CatalogItemSeoRow seoRow, VariationRow variationRow, EntryContentBase content, MetaObjectAccessor metaObjectAccessor)
at EPiServer.Commerce.Catalog.Provider.Construction.EntryBuilder.ConstructEntries(CatalogEntryDto entryDto, IDictionary`2 versionsForUnpublishedContent, IList`1 entryNodeRelations, String language)
How can I avoid this error? Is a "short string" metafield actually capable of using up to 512 characters? Or can it only use 255?
Hi all,
I have a metafield of type "Short String" - in the database I see it has max length of 512.
So, we have imported data into this metafield which is 512 characters long.
But when I use IContentLoader to load a product containing that metafield, it is mapped to an EPiServer.Core.PropertyString which has a max length of 255... so, this exception is thrown:
How can I avoid this error? Is a "short string" metafield actually capable of using up to 512 characters? Or can it only use 255?
Thanks,
- Ken