Try our conversational search powered by Generative AI!

ContentReference List acting strangely in edit mode

Vote:
 

I have a block which contains an IList.

    [ContentType(DisplayName = "Super Happy Fun Block", GUID = "b5d5c00c-dc8e-4ada-8319-20fd3474d4e7", Description = "")]
    public class SuperHappyFunBlock : BlockData
    {
        public virtual string Title { get; set; }

        public virtual IList Items { get; set; }
    }

I've added this block as a property to the Start page in an Alloy test site.

    public virtual SuperHappyFunBlock SuperHappyFunStuff { get; set; }

I've added a basic PropertyFor on the StartPage's index view.

    @Html.PropertyFor(x => x.CurrentPage.SuperHappyFunStuff)

And I've added a very basic view for the block.

    @model SuperHappyFunBlock

    

Title

@Html.PropertyFor(m => m.Title)

Items

@Html.PropertyFor(m => m.Items)

When I go to the All Properties of the Start page, the ContentReference list works as you would expect -- existing items show in the list, and you can add to or remove from.  However, when I click on the block using On-Page Editing, I get the popup window with the block properties, but the content reference list is always empty.  If I add a page to the list, it replaces whatever was previously in the list with this new page.

Is this a bug, or is there something else I'm missing?

#144938
Feb 22, 2016 23:09
Vote:
 

Forgot to mention...  I first noticed this in CMS 9.6.1, but I've verified the issue still exists in 9.7.0.

#144939
Feb 22, 2016 23:14
Vote:
 

This is a recently logged bug CMS-2930

#144944
Feb 23, 2016 5:32
* 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.