Try our conversational search powered by Generative AI!

Default value for a string only 100 chars long



I have just been tracking down a bug with an EPiServer 5 R2 SP2 site, and I have discovered that we have a page property of type "short string", which supports values up to 255 characters long. However, the default value for that property is limited to only 100 characters in admin mode.

Does anyone know a way round this, or if this is still the case in EPiServer 6?



Oct 31, 2011 14:18

Tried this on our demo site ( CMS 6 R2) and yes the default value can only be 100 characters long. Also tried this on a XHTML property and a LongString and both could handle more than 100 characters. 

Nov 01, 2011 9:28

Thanks Toni,

I can confirm that the Long String property supports a default value of > 100 chars in EPiServer 5 too. I will use that to solve my problem.

Nov 01, 2011 11:52


I have reported this as a bug and I fixed this while at it. If someone needs to get this working on a current version a workaround is to replace the EditPageTypeField.aspx file, do an override of OnLoad, call base.OnLoad and then add the following code:

DefaultValue.MaxLength = PropertyDefinitionType.Type == null || PropertyDefinitionType.Type.DataType != PropertyDataType.LongString ? 255 : 0;

Nov 01, 2011 12:45
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.