This project is read-only.

Workflow for send email for commenting

Topics: Customizing Orchard, General
Nov 13, 2013 at 7:47 AM
I have created workflow to send mail message for comment. By this article:

But I have get 2 messages for each comments:


I think, it is because comment create action calls manager.Publish(content.ContentItem); two times.

How to create workflow to send one email for one comments?
Nov 13, 2013 at 8:53 AM
What version of Orchard are you using? I get comment notifications every day, and don't see that problem.
Nov 13, 2013 at 9:02 AM
Edited Nov 13, 2013 at 9:13 AM
Orchard v.1.7.1 And as I see in version control it contains double Services.ContentManager.Create(comment);

But, last source code has:


As I understand, bbdb4429e573 contains double Services.ContentManager.Create(comment);
Nov 16, 2013 at 7:28 AM
That code is perfectly normal as far as I can tell: the published comment workflow activity doesn't trigger on draft comments, so only the second one will fire your workflow. There has been a time when that wasn't the case but it has since been fixed.
Nov 21, 2013 at 1:12 PM
Edited Nov 21, 2013 at 3:48 PM
Could this be the same issue as this?
Nov 21, 2013 at 3:36 PM
No, I don't think so. My issue is bug in 1.7.1 version of Orchard CMS, in current sources it was fixed, so I hope 1.8 or 1.7.2 will not send two messages for comments.