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?
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.
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.
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.
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:
and
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?
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.
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?
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
Check your smtp configuration in your web.config.
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.
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.
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.
is working on a reply...