Developer forum

Forum » CMS - Standard features » Error when saving item instance

Error when saving item instance

Lars Larsen
Reply

Hi,

With the code below I have created the item "PagePropertiesItemEntry". I have attached the item to a website as page properties (in the Websites module). When I edit a page and sets a checkmark for one of the choises eg. "Facebook" saving the page fails with an error (see attached screenshot below). Any idea why?

    [Item("Page Properties by ItemEntry")]
    public class PagePropertiesItemEntry : ItemEntry
    {
        #region Kommentarspor
        /// <summary>
        /// Comment types
        /// </summary>
        public enum CommentsEngine
        {
            /// <summary>
            /// Use Dynamicweb commmets
            /// </summary>
            Dynamicweb = 1,

            /// <summary>
            /// Use Facebook comments
            /// </summary>
            Facebook = 2
        }

        /// <summary>
        /// Gets or sets a value indicating which comments should be used on a page.
        /// </summary>
        [Name("Vis kommentarspor")]
        [Group("Kommentarspor")]
        [Field("Vis kommentarspor", typeof(Dynamicweb.Content.Items.Editors.CheckboxListEditor<CommentsEngine>))]
        public CommentsEngine PageCommentType { get; set; }

 

 

 

Capture.JPG

Replies

 

You must be logged in to post in the forum