Registering IContent as allowed type to ContentReference does not work

Found in

EPiServer.CMS.UI 8.0

Fixed in

EPiServer.CMS.UI.Core 9.0.0


Jul 08, 2015


Oct 01, 2015


Falcon/CMS/Edit UI


Closed, Fixed and Tested

Steps to reproduce

  1. Add a content reference property to your model. For example

        AllowedTypes = new[] { typeof(IContent) })]
    public virtual ContentReference MyReference { get; set; }

  2. Edit it.
Expected: You can add any content to the property.
Actual: You cannot add any content to the property

The same problem exists for ContentArea properties.

If you define a content reference property to use IContentData instead, it works.
It is unexpected to be able to define IContentData as an allowed type to a content reference property, since IContentData does not have a ContentLink property.