Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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) :-)
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
return new Attempt<PublishStatus>(false, new PublishStatus(Content, PublishStatusType.FailedCancelledByEvent));
You have to change two lines (1031 and 1034).
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...
Write your reply to:
Image will be uploaded when post is submitted