N2Cms, Adding a new property to a ContentPageBase class, corrupts the already entered data.
- by Nour Sabouny
i want to modify the ContentPageBase, in a functional site,
i tried to add a property called for example (weight),
but if there is an existing page in the database, the site will malfunction, and throws an Exception, of (Object reference not set to an instance of an object).
how can i correct the already entered data ?
public abstract class ContentPageBase : PageBase, ICommentable
{
[EditableTextBox("Weight", 10, ContainerName = Tabs.Details)]
//newly added property.
public virtual int Weight
{
get { return (int)GetDetail("Weight"); }
set { SetDetail("Weight", value); }
}
}