diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs index 32e75f229..ab0265923 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs @@ -120,7 +120,8 @@ namespace Orchard.Comments.Services { } public void DeleteComment(int commentId) { - _orchardServices.ContentManager.Remove(_orchardServices.ContentManager.Get(commentId).ContentItem); + // Get latest because the comment may be unpublished if the anti-spam module has caught it + _orchardServices.ContentManager.Remove(_orchardServices.ContentManager.Get(commentId, VersionOptions.Latest).ContentItem); } public bool CommentsDisabledForCommentedContent(int id) {