Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • CoolKiwiBloke 12 posts 51 karma points
    Jan 05, 2015 @ 01:26
    CoolKiwiBloke
    0

    Getting Notifications Working

    I'm trying to send myself a notification when someone posts a comment but am struggling.

    The issue appears to be setting up the template.

    I originally assumed that I could just publish the "Comment Email Templates" root node. But that had no effect so I am guessing that is only an example?

    So I created a new email template under my "Comment Configuration" node. I assumed that the "Email Template Name" is how the correct template is selected... however that isn't editable - its a label database.

    So I hacked the datatype and made it a string, and set it to "AdminCommentNotification" but still no joy. As best I can tell the template isn't being picked up.

    Could someone please run through how to correctly configure the template.

    The error in the log is:

    2015-01-05 00:24:32,778 [26] ERROR uCommentsy.BusinessLogic.EventHandlers.UmbracoNodeEventsForComments - [Thread 15] Send notification failed when node 4282 was published.

    System.InvalidOperationException: Sequence contains no matching element

       at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)

       at uCommentsy.BusinessLogic.Services.UmbracoService.GetEmailTemplateNode(IPublishedContent node, String templateName) in d:\_PROJECTS\Personal\uCommentsy\uCommentsyForUmb7\Source\uCommentsy.BusinessLogic\Services\UmbracoService.cs:line 167

       at uCommentsy.BusinessLogic.Services.UmbracoService.GetEmailProperties(IPublishedContent node, String emailTemplateName) in d:\_PROJECTS\Personal\uCommentsy\uCommentsyForUmb7\Source\uCommentsy.BusinessLogic\Services\UmbracoService.cs:line 136

       at uCommentsy.BusinessLogic.Services.EmailService.SendNotificationEmails(IPublishedContent post, CommentInfo commentInfo, String postTitle, List`1 subscriptions) in d:\_PROJECTS\Personal\uCommentsy\uCommentsyForUmb7\Source\uCommentsy.BusinessLogic\Services\EmailService.cs:line 40

       at uCommentsy.BusinessLogic.Services.SubscriptionService.SendSubscriptionNotifications(IContent commentNode) in d:\_PROJECTS\Personal\uCommentsy\uCommentsyForUmb7\Source\uCommentsy.BusinessLogic\Services\SubscriptionService.cs:line 71

       at uCommentsy.BusinessLogic.EventHandlers.UmbracoNodeEventsForComments.PublishingStrategy_Published(IPublishingStrategy sender, PublishEventArgs`1 e) in d:\_PROJECTS\Personal\uCommentsy\uCommentsyForUmb7\Source\uCommentsy.BusinessLogic\EventHandlers\UmbracoNodeEventsForComments.cs:line 89

    2015-01-05 00:24:32,981 [26] INFO  Umbraco.Core.Services.ContentService - [Thread 15] Call was made to ContentService.Publish, use PublishWithStatus instead since that method will provide more detailed information on the outcome

Please Sign in or register to post replies

Write your reply to:

Draft