Skip to Main Content
Customer Feedback

We love feedback from you on our products and the problems in your daily work that you would like us to solve. Please describe the challenge you're encountering and your desired outcome. Be as detailed as possible.

For technical issues or bugs please head to Support or our Developer Community. You can assign up to 20 votes in total. Thank you for your feedback.

Status explanation: 'Future Consideration' = Continuing to collect further feedback, not planned at this time. 'Investigating' = Prioritized for deeper customer and feasibility investigations ahead of planning development.

Categories Technical
Created by Guest
Created on May 10, 2022

Changing page type settings in Admin removes AvailableContentTypes that are IContent and not pages

Consider the following page type.

[AvailableContentTypes(Availability.Specific, Include = new[] { typeof(ReactionLike), typeof(ReactionComment), typeof(NewsListPage) })]
public class NewsPage : PageData {}

And custom IContent implementations

public class ReactionLike : IContent {}
public class ReactionComment : IContent {}

It works initially, to programmatically add content on NewsPage with AccessLevel.Read so users that can read the page can have ReactionLike and ReactionComment on the page.

But, when changing something in another admin tab for this Page Type, like set the archive container, only NewsListPage is a valid member of AvailableContentTypes.

This is obviously a bug, and either the UI should display all possible available content types (IContent:s) instead of only pages, OR you could add hidden fields for custom IContent that are not pages, so they are at least posted to the backend when saving Page Type changes in admin, so the definition in code isn't overwritten. OR you should re-add those non-selectables but code-defined content types in backend after posting the update.

This is a very disturbing issue that you've had for many years, that should be a very easy fix.

Product: EPiServer CMS 11