Properties are read-only when published by delayed publish or projects

Fixed in

EPiServer.CMS.Core 9.11.0

Created

Jun 01, 2016

Updated

Jul 06, 2016

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. Update AlloyTech to the latest available release (9.10).
  2. In episerver.config, under ApplicationSettings, set uIDefaultValueForSetChangedOnPublish ="true".
  3. Hook into Publishing event and set
    base.SetChangedOnPublish = true;
  4. Create/edit a page and schedule for future publishing.
  5. Let the scheduled job run, or run it manually.

Expected: Page is published with PageChangedOnPublish set to true.
Actual: Error thrown: The property PageChangedOnPublish is read-only.

Stack trace:
System.NotSupportedException: The property PageChangedOnPublish is read-only.
at EPiServer.Core.PropertyData.ThrowIfReadOnly()
at EPiServer.Core.PropertyBoolean.set_Boolean(Boolean value)
at EPiServer.Core.PropertyData.SetPropertyValue(Object value, SetPropertyValueDelegate doSet)
at EPiServer.Core.ContentData.SetValue(String index, Object value)
at EPiServer.Templates.Alloy.Models.Pages.SitePageData.PublishingPage(Object sender, PageEventArgs p) in c:\inetpub\CMS7\CMS7.5Latest\Web\Models\Pages\SitePageData.cs:line 100