Copied to clipboard

Flag this post as spam?

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


  • Den Gordo 29 posts 49 karma points
    Sep 13, 2012 @ 16:17
    Den Gordo
    0

    Cpmments notification and subscription doesn't work "Sequence contains no matching element"

    Hi,

    I'm using Umbraco 4.7.2 and latest uBlogsy 2.1.1.0.
    When new comment is created uBlogsy does save and display the comment however it does show uBlogsyDicContactFormError message and umbracoLog gets two errors:

    Sequence contains no matching element   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)     at uBlogsy.BusinessLogic.EmailService.GetEmailTemplateNode(Int32 pageId, String templateName) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 247     at uBlogsy.BusinessLogic.EmailService.GetEmailProperties(Int32 pageId, String emailTemplateName, String& emailBody, String& subject, String& replyToAddress, String& adminContactEmail) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 132     at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 77     at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 46

    and

    Sequence contains no matching element     at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)     at uBlogsy.BusinessLogic.EmailService.GetEmailTemplateNode(Int32 pageId, String templateName) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 247     at uBlogsy.BusinessLogic.EmailService.GetEmailProperties(Int32 pageId, String emailTemplateName, String& emailBody, String& subject, String& replyToAddress, String& adminContactEmail) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 132     at uBlogsy.BusinessLogic.EmailService.SendAdminNotificationEmail(String postUrl, Int32 pageId, CommentInfo commentInfo, Int32 commentId) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 173     at uBlogsy.BusinessLogic.CommentService.SubmitComment(HttpRequest request, Int32 pageId, CommentInfo commentInfo, Boolean subscribe) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\CommentService.cs:line 128

    I've configured Web.config mailSettings smpt line and "Umbraco Notifications" does send emails and uBlogsySubscriber member type exists. I've recycled app pool by touching web.config and republished entire site but with no luck. Could you please point me out where to look at to fix that problem?

  • aysha 16 posts 36 karma points
    Sep 13, 2012 @ 16:22
    aysha
    0

    Hi

    Can you debug it and see that the collection is not null. From the error message it looks like the collection its trying to retrieve from is either null or doesnt have the matching element.

  • Den Gordo 29 posts 49 karma points
    Sep 13, 2012 @ 16:27
    Den Gordo
    0

    Hi Aysha,

    Thanks for youe reply. I'm not sure I understand what you mean. How to debug it and what collection are you talking about?

  • aysha 16 posts 36 karma points
    Sep 13, 2012 @ 16:30
    aysha
    0

    Hi

    I mean you can debug the source code for blogsy by putting a breakpoint in the failing method and check out whats happening at this line

    D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 247
  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 24, 2012 @ 10:59
    Anthony Dang
    0

    Check your smtp configuration in your web.config.

     

  • Den Gordo 29 posts 49 karma points
    Sep 27, 2012 @ 14:01
    Den Gordo
    0

    Ok, for some reason property "uBlogsyEmailTemplateName" was missing from "uBlogsyEmailTemplate" document type. The second error was "'uBlogsy.BusinessLogic.Models.CommentInfo' does not contain a constructor that takes 6 arguments" in Contact.ascx.cs at line 175, the 7th argument DateTime is missing.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 08, 2012 @ 23:26
    Anthony Dang
    0

    Seems like you've had a lot of issues with your installation.

     

    "'uBlogsy.BusinessLogic.Models.CommentInfo' does not contain a constructor that takes 6 arguments"

    This is likely due to a wrong version of a dll. Try replacing the dlls again..

    You could also try a fresh install of Umbraco and uBlogsy.

     

  • Den Gordo 29 posts 49 karma points
    Oct 09, 2012 @ 17:53
    Den Gordo
    0

    Hi,

    Thanks for the advice, but unfortunately it's impossible as I have to finish the project development and deploy it to client. I've included fixed and renamed copy Contact.ascx.cs in to my project and that fixed the issue.

    This might happened because I was playing with different versions of uBlogsy on my Umbraco installation, by removing previous version and installing new one and maybe something went wrong.

    Regards Den.

Please Sign in or register to post replies

Write your reply to:

Draft