Adding a property named Item on a content type causes problems

Created

Apr 13 2017

Updated

May 15 2017

Area

CMS Core

State

Backlog

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 exception at initialization time when someone has created a property named Item on a content type. See related bug.

Steps to Reproduce
1: Create a new Alloy
2: Create a new property with name Item in for example the standardpage like this:
[Display(
GroupName = SystemTabNames.Content,
Order = 320)]
public virtual string Item

{ get; set; }

3: Try to run the site and you will get error

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

Comments