Try our conversational search powered by Generative AI!

AllowedTypes not working with a marker interface inheriting from IContentData

Fixed in

EPiServer.CMS.UI 11.4.2

(Or a related package)

Created

Mar 19, 2018

Updated

Apr 03, 2018

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Create an Interface.

    public interface IFoo : IContentData { }
    

  2. Create a UIDescriptor.

    [UIDescriptorRegistration]
    public class IFooUIDescriptor : UIDescriptor<IFoo> { }
    

  3. Create a block that implements the interface.

    [ContentType(GUID = "EB67A99A-E239-41B8-9C59-20EAA5936047")]
    public class FooBlock : BlockData, IFoo { }
    

  4. Add a ContentReference property with the AllowedTypes attribute to a page.
  5. Run the Alloy website in CMS edit mode.
  6. Go to the page where you added the new ContentReference property.
  7. Try to add a content reference by clicking on the property.
  8. ContentReference is not showing any content but Root.