Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Prevent moving items between ContentArea with different AllowedTypes

Fixed in

EPiServer.CMS.UI 11.2.0

(Or a related package)

Created

Oct 11, 2017

Updated

Dec 19, 2017

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. Define two ContentArea properties on one page
2. Set different allowed types each property (see code below)
3. Using D&D add a page to first ContentArea (ContentArea has to support the page type)
(it should not be possible to drag same page to a second ContentArea, because it has different type)
4. Drag a page from ContentArea to second ContentArea

Expected: The operation should be blocked, because ContentAreas have different allowed types
Actual: The page can be moved between ContentAreas

 [Display(
    GroupName = SystemTabNames.Content,
    Order = 500)]
        [AllowedTypes(typeof(StartPage), typeof(ArticlePage))]
        public virtual ContentArea MainContentArea2 { get; set; }
        [Display(
    GroupName = SystemTabNames.Content,
    Order = 501)]
        [AllowedTypes(typeof(StartPage), typeof(NewsPage))]
        public virtual ContentArea MainContentArea3 { get; set; }