How to Solve Meta field Truncation Issue

  • Updated
Description

Meta fields in Commerce Connect get truncated.

Before Commerce Connect 13.22, LongString has only 16 chars. ( Length = 16 in MetaField table)

Starting from Commerce Connect 13.22, LongString has been upgraded to nvchar(max) (Length = -1 in MetaField table)

Any old meta field with metadata type LongString (created before Commerce Connect 13.22) still has Length = 16 in the MetaField table. Whenever a new meta field is added, it will trigger a stored procedure which will result in truncation of the new data to 16 for those old LongString fields. 

This is a bug and has been fixed in Episerver.Commerce.Core 13.31.0.

https://world.optimizely.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=COM-13170 

 

Steps

The short-term solution:

The customer updates the value of the Length field from 16 to -1 for LongString (DataTypeId=32) in the MetaField table in the Commerce Connect database. 

Update MetaField
Set Length = -1
Where DataTypeId=32 -->for LongString type

Recommended long-term solution:

Upgrade to Commerce Connect 13.31.0