Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
I would also accept a way to make some of them forced.
Consider adding:
[ForcedContentTypes(Include = new[] { typeof(ReactionLike), typeof(ReactionComment) })]
Then they save event could iterate these and ensure they are present.
Or just extending the current attribute with a new property.
[AvailableContentTypes(Availability.Specific, Include = new[] { typeof(NewsListPage.NewsListPage) }, Forced = new[] { typeof(ReactionLike), typeof(ReactionComment) })]
Could you not change the types to inherit PageData and then hide the property with overrides so they appear in the admin. You'd end up with similar results without the issues. Usually when you want Container items in the tree you create them from PageData without any MVC rendering.
You mean use AvailableInEditMode=false?
Wouldn't these pages be visible in page tree too then? We don't want that.
I understand that this is a possible solution, but still, this seems like a Admin/UI bug anyway, since it's possible to code like this, and in some cases this is a viable solution, but the "save"-button messes things up. So ideally hidden inputs instead of checkboxes for IContent that is not PageData — and ensure these remains as available — seems like the simplest fix.
The pages would only be availiable in edit mode in places you've said they are allowed. All page types should be restricted, so if you don't allow them they won't be in edit mode but will still appear in the admin. It's just a idea for your immediate problem
So you mean if I have 10 instances of the PageData under a NewsPage it won't show in the Page Tree if it has AvailableInEditMode=false? Good to know. I mostly used that on local blocks, so that part (on PageData) is not tested by me...
BTW, our current "fix" is setting "allow all", so they can have archive settings and functionality at the same time, and awaiting fix in EPiServer... Noticing them that we have "opened up" those restrictions for the moment.
I think maybe we're talking at cross purposes. When you said availible in the page tree I thought you meant for the creation dialogue not in the actual page tree view. It sounds like you've got it handled with a fix so hopefully Episerver will come up with a solution. I'm not aware of anything being hidden if it's AvailibleInEditMode=false
Ok.
Changed that part I think you misunderstood.
—
When someone do changes in for the PageType
in admin, the ReactionLike
and ReactionComment
that is IContent
implementations is no longer possible to create programmatically under NewsPage
.
Consider:
When someone do changes in for the
PageType
in admin, theReactionLike
andReactionComment
that isIContent
implementations is no longer possible to create programmatically underNewsPage
.In our case they changed Sort Index and set the Stop Publish Date to 90 days.
What happens when we are trying to save an
ReactionLike
on aNewsPage
:It's probably because that these isn't listed in admin and therefore isn't posted as selections when pressing save-button and update the settings for the
PageType
.Possible solutions:
We could consider setting sensible defaults in code and re-deploy, but that isn't a solid solution for this problem.
The only sensible fix is that EPiServer UI won't mess up what is defined in code and still allow these changes when the customer feels they want to do changes themselves.
This happens a couple of times a year, probably because we "fix" it by resetting to defaults, and they go and re-add their changes again, so it is really an annoying and a very nasty bug...