Misleading Description text on Content Area after adding AllowedTypes attribute

Vote:
 

Hi Folks

We are adding some restricting some block types to certain content areas and have followed the guide https://docs.developers.optimizely.com/content-management-system/docs/restricting-content-types-in-properties, specifically the section 'Restrict based on base classes and interfaces'. 

We have created an interface  

public interface IFullWidthComponent : IContentData
{
}

and UIDescriptor

[UIDescriptorRegistration]
public class FullWidthComponentUiDescriptor : UIDescriptor<IFullWidthComponent>
{

}

Applied it to the required blocks

public class HeaderPromoBannerBlock : BlockData, IFullWidthComponent

and the required content areas.

[AllowedTypes(AllowedTypes = new[] { typeof(IContent) }, RestrictedTypes = new[] { typeof(IFullWidthComponent) })]
public virtual ContentArea? MainContentArea { get; set; }

The blocks are now restricted as intended, which is perfect. However the content area is now showing the following message underneath - Of the listed restricted types, only the two HomePage Hero and the Header Promo should be listed.  In fact these are the only ones which are actually being restricted as the feature works fine aside from this. Is this a known issue and is there a work around to fix it?

#327546
Aug 15, 2024 14:39
Vote:
 

Not sure why you need to use both AllowedTypes and RestrictedTypes. But I think the issue may be cause of conflict between list of allowed types and list of restricted types.

I think just use RestrictedTypes setting is enough.

#327547
Aug 15, 2024 15:46
Vote:
 
[AllowedTypes(RestrictedTypes = new[] { typeof(IFullWidthComponent) })]

Hmmm, I've also tried with this and am getting the same results

#327548
Aug 15, 2024 15:57
Vote:
 
[AllowedTypes(RestrictedTypes = new[] { typeof(IFullWidthComponent) })]

Hmmm, I've also tried with this and am getting the same results

#327549
Aug 15, 2024 15:57
Vote:
 

Hi,

Which Optimizely Cms version that you are using?

#327611
Aug 16, 2024 16:51
Vote:
 

Hi,

We are on 12.30.0

#327689
Aug 19, 2024 8:07
Vote:
 

Hi Dave,

It’s likely due to the default behavior of the CMS which provides feedback to users about content type restrictions.

 If you want to hide or remove this description, you might need to adjust the property editor settings or customize the way the property is rendered in the admin interface.

#328148
Aug 27, 2024 15:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.