diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs index f299d7440..2ee89c27c 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs @@ -27,11 +27,8 @@ namespace Orchard.Comments.Controllers { return this.RedirectLocal(returnUrl, "~/"); var comment = Services.ContentManager.New("Comment"); - Services.ContentManager.Create(comment, VersionOptions.Draft); - var editorShape = Services.ContentManager.UpdateEditor(comment, this); - if (!ModelState.IsValidField("Comments.Author")) { Services.Notifier.Error(T("Name is mandatory and must have less than 255 chars")); } diff --git a/src/Orchard.Web/Modules/Orchard.Workflows/Handlers/WorkflowContentHandler.cs b/src/Orchard.Web/Modules/Orchard.Workflows/Handlers/WorkflowContentHandler.cs index 451436704..ef4db183a 100644 --- a/src/Orchard.Web/Modules/Orchard.Workflows/Handlers/WorkflowContentHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Workflows/Handlers/WorkflowContentHandler.cs @@ -33,9 +33,17 @@ namespace Orchard.Workflows.Handlers { () => new Dictionary { { "Content", context.ContentItem } })); OnUpdated( - (context, part) => - workflowManager.TriggerEvent("ContentUpdated", context.ContentItem, - () => new Dictionary { { "Content", context.ContentItem } })); + (context, part) => { + if(context.ContentItemRecord == null) { + return; + } + + workflowManager.TriggerEvent( + "ContentUpdated", + context.ContentItem, + () => new Dictionary { { "Content", context.ContentItem } } + ); + }); } } } \ No newline at end of file