Search code examples
c#event-handlingumbracobefore-save

Umbraco v 6 BeforeSave event


After upgrading from Umbraco v4 to 6 the customized BeforeSave event is not working anymore. Even if the the value of a property on a document appears to be set inside the BeforeSave method all data is lost.


Solution

  • The event model changed quite a bit between v4 and v6. Take a look here: https://our.umbraco.org/documentation/Reference/Events/application-startup - I'd guess you have to register a ContentService.Saving event on OnApplicationStarted instead of your BeforeSave event.