Adding a property named Item on a content type causes problems

Found in

EPiServer.CMS.Core 7.0.586.0

Created

Apr 13 2017

Updated

Nov 17 2017

Area

CMS Core

State

Closed, Fixed and tested

Voting

Affected? You can raise the priority of a bug by voting for it. By doing so, you will be helping our developers to choose which bug to fix next.

Voting is disabled for closed bugs.

0

Description

We should make sure to throw an exception at initialization time if someone created a property named Item on a content type. See related bug.

Steps to reproduce
1. Create a new Alloy site.
2. Create a new property with name Item. For example, in the standardpage like this:

[Display(
GroupName = SystemTabNames.Content,
Order = 320)]
public virtual string Item
{ get; set; }

3. Try to run the site.
4. You get an error.

Adding a property named Item on a Block type causes no problems initially when using them as a local block. We should still make the same fix for block, because it causes problems in many cases (for example, when using it as a dynamic block).

Comments