When I try to cancel the Document_BeforePublish event with e.Cancel = true I get a YSD.
We are using 6.1.5
The error message is:
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.presentation.editContent.ShowMessageForStatus(PublishStatus status) +58 umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +141 umbraco.controls.ContentControl.DoSaveAndPublish(Object sender, ImageClickEventArgs e) +158
Cancel Document_BeforePublish event
When I try to cancel the Document_BeforePublish event with e.Cancel = true I get a YSD.
We are using 6.1.5
The error message is:
I have tried everything (related to http://our.umbraco.org/documentation/Reference/Events/application-startup):
I know that I should use ApplicationEventHandler because of our version (6.1.5) :-)
Any suggestions?
Has anyone solved this problem?
Yes - we had to recompile the Umbraco source. You will find the affected file here: \src\umbraco.cms\businesslogic\web\Document.cs
Instead of
we wrote
You have to change two lines (1031 and 1034).
Cheers Tobias
Hi Tobias, would be awesome if you could send in a pull request with that fix so that you don't have to keep customizing the core for each release!
Let me know if you need a hand with that.
is working on a reply...