Vulnerability in EPiServer.Forms
We noticed that scheduled publish does not work for a site we have just upgraded to 7.5.
The error we get is this:
17.2.1 Error when trying to publish delayed version 14816_65252
System.NotSupportedException: The property PageChangedOnPublish is read-only. at EPiServer.Core.PropertyBoolean.set_Boolean(Boolean value) at EPiServer.Core.PropertyData.SetPropertyValue(Object value, SetPropertyValueDelegate doSet) at EPiServer.Core.PageData.set_SetChangedOnPublish(Boolean value) at EPiServer.PageEventHandler.Invoke(Object sender, PageEventArgs e) at EPiServer.Core.DefaultContentEvents.RaiseCorrespondingPageEvent(String key, ContentEventArgs eventArgs) at EPiServer.Core.DefaultContentEvents.RaiseCancellableContentEvent(String key, String defaultReason, ContentEventArgs eventArgs) at EPiServer.Core.DefaultContentRepository.Publish(ContentReference contentLink, Nullable`1 delayPublishUntil, AccessLevel access) at EPiServer.Core.ContentRepository.Publish(ContentReference contentLink, AccessLevel access) at EPiServer.Util.DelayedPublishJob.PublishContent(IContentRepository publicContentRepository, ContentRepository internalContentRepository, JobStatus status)
Anyone seen this?
The problem I had was that I had implemented that I always set the flag PageChagedOnPublish to true.
This I do in the PublishingPage-event and it works fine on a normal publish but when there is a delayed publish the page object is read only.
This was working in 7.1 and I can not find anything about it in the breaking changes document.
Anyone know why this has changed?
There is a configuration settings: UIDefaultValueForSetChangedOnPublish, that you should be able to use to accomplish this in a EPiServer 7.5 site. This also gives the editor an option to unset this for specific content instances, for instance when just updating a spell change.
Thanks Linus, this was exactly what I was looking for in the first place. Changing to this now.
Linus, is this possible to accomplish on just one spesific page type? I.e with some kind of event? Seems like the properties SetChangedOnPublish and this[MetaDataProperties.PageChangedOnPublish] is read only.