Vulnerability in EPiServer.Forms
the documentation for this particular PageData property says :
indicating whether the PageData.Changed should be updated on publish
I have set this to true in the SetDefaultValues method for our pages, but it does not update when the page is published.
do I need to hook into the publish event instead? or am I using it incorrectly?
I appreciate there is a tickbox on the settings tab, but seemed that this property was the way to avoid having to use that tickbox.
The Modified Date, I believe in code it is PageData.Changed is only updated if "Update modified date"
You can check this by default so on every publish it will also update this date
I believe their is a configuration setting aswell that can be set to Mark as modified by default, have a search for "uIDefaultValueForSetChangedOnPublish"
If you want changed to be always updated when publish, use uIDefaultValueForSetChangedOnPublish as Minesh suggested - more information Release note - CMS-8263 (optimizely.com)
if you want to have more flexibility, you can listen to IContentEvents.PublishingContent and set the value on content (you can have some criteria etc.)
thanks for that, the release notes are talking about adding that settings to the <appsettings node in a web.config - and seem to be referencing the CMS 11 package.I am having this problem in CMS 12, where does this need adding in the appsettings.json - its not mentioned on either of these documentaion pages
Apparently it was removed in CMS 12, I'm not sure why. but your second option (IContentEvents) should still work
Guess I should hide the tickbox as well then, or it will be confusing for the editors.
hi Quan Mai,
Thanks for the clarification, I just meant that if I am setting modified explicitly on publish - regardless of what the checkbox is set to, that would seem to make that checkbox confusing for editors. So I think I will use an editordescriptor to hide it to avoid that confusion.
I, too, think that this property should be added in CmsUi settings.