I've attached a little event handler to the content service for "Creating", "Created" and "Saved". When using the event arguments of the "Creating" method and setting e.Cancel = true, the "Created" event is no more called but still the "Saved" event and the item is still being created.
Can someone tell me if I have misunderstood the concept or if this may be a bug? Im using v6.0.2.
Well I just discovered that this is my fault because when creating an item through the UI, still the Document.MakeNew() is called and not IContentService.CreateContent().
Good to know: Document.MakeNew() calls IContentService.CreateContent() but has its own cancelling event in before. Therefore the content is still being created and cannot be cancelled through the IContentService events only!
I've opened a bug report because the handling is not 100% correct regarding to the backwardcompatibility of the Document events that are obsolete in v6.
IContentService Events: Cancel not working?
I've attached a little event handler to the content service for "Creating", "Created" and "Saved". When using the event arguments of the "Creating" method and setting e.Cancel = true, the "Created" event is no more called but still the "Saved" event and the item is still being created.
Can someone tell me if I have misunderstood the concept or if this may be a bug? Im using v6.0.2.
Thanks
Well I just discovered that this is my fault because when creating an item through the UI, still the Document.MakeNew() is called and not IContentService.CreateContent().
Good to know: Document.MakeNew() calls IContentService.CreateContent() but has its own cancelling event in before. Therefore the content is still being created and cannot be cancelled through the IContentService events only!
I've opened a bug report because the handling is not 100% correct regarding to the backwardcompatibility of the Document events that are obsolete in v6.
http://issues.umbraco.org/issue/U4-1875
is working on a reply...