Subscriber Emails and Post Comment Email confirmations
Me Again.
Sorry am testing the comment notification process and when a comment is recieved the commenter does NOT get a confirmation email. Nor does a subscriber of that post.
It just doesn't turn up.
The admin gets a confirmation email just fine.
There seems to be 3 email templates:
AdminContact - not sure what that is?
AdminCommentNotification - which works fine
CommentNotification - which presumably is for subscribers to the post
Does new comments also receieve the CommentNotificiation regardless of subscription inclusion?
I have checked the HTML and which the exception of some redundant spans all looks good.
The commenter doesn't get an email even though he has commented and if a person also makes another comment the original commenter doesn't get a email even though he has subscribed.
The email address is stored in the Subcribers (Subscription Meta Data) section on the comment form.
String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.SubscriptionMetaData..ctor(String subscriptionMetaDataString) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Models\SubscriptionMetaData.cs:line 23 at uBlogsy.BusinessLogic.SubscriptionService.<GetSubscriptionMetaData>b__6(String x) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 146 at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 76 at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 31
String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.Subscription..ctor(Member m, String[] items) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Models\Subscription.cs:line 80 at uBlogsy.BusinessLogic.Extensions.MemberExtensions.<>c__DisplayClass3.b__1(String[] x) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Extensions\MemberExtensions.cs:line 31 at System.Linq.Enumerable.<>c__DisplayClass12`3.b__11(TSource x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 82 at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 31
I got a similar error. When commenting and not ticking the "subscribe" checkbox. This error comes. I got it form the Log Manager. However notification e-mail, that I have received a comment to the post does not come still.
Object reference not set to an instance of an object.
at umbraco.cms.businesslogic.Content.CreateContent(ContentType ct)
at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String LoginName, String Email, MemberType mbt, User u)
at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String Email, MemberType mbt, User u)
at uBlogsy.BusinessLogic.SubscriptionService.SubscribeToPost(Int32 pageId, CommentInfo commentInfo, Boolean subscribe)
in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 72
at uBlogsy.BusinessLogic.CommentService.SubmitComment(HttpRequest request, Int32 pageId, CommentInfo commentInfo, Boolean subscribe)
in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\CommentService.cs:line 119
Member m = Member.GetMemberFromEmail(commentInfo.EmailPrefixed) ??
Member.MakeNew(commentInfo.EmailPrefixed, commentInfo.EmailPrefixed, MemberType.GetByAlias("uBlogsySubscriber"), new User(0));
Something is not instantiated. My guess is that the MemberType is not there. Can you check the member section and see if the uBlogsySubscriber Member Type exisits.
String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.Subscription..ctor(Member m, String[] items) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Models\Subscription.cs:line 80 at uBlogsy.BusinessLogic.Extensions.MemberExtensions.<>c__DisplayClass3.<uBlogsyGetSubscriptions>b__1(String[] x) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Extensions\MemberExtensions.cs:line 31 at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 82 at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 31
However what I did was, commenting put the lintes Anthony have mentioned above, and compiled the sources. Honestly: I can not tell if your problem is the same or not.
Anyways it you think giving it a try, make sure to save the dll you have now, so you can paste it back in case of any problem.
From your earlier post it looks like you have the Umbraco sites set up to use the UK locale, so it shouldn't be a conflict there then (if you have the database user set to one language but the site to another, you can sometimes get odd DateTime conflicts).
You could try forcing the locale in your web config file and see if that makes a difference:
Actually I deleted the comments and re-created them.
The system does fire emails so I doubt its anything to do with system.mail.
I don't think this is local to me either. Its never worked from vanilla installation. It feels more like a assembly or something is missing or a path is wrong or summit.
Has anyone got it going from vanilla installation on a Windows 2008 server, IIS 7 Inetegrated .net 4 with SQL 2005?
No Anthony. The first thing I did was dump the cache.
I have been writing URLrewrite rules in the web.config all day which triggers a re-compile and dumps the cache. I suspect it me farting around with the Globalisation setting and your DLL writing to the members section that did it.
Very unsatifactory.
At least it works and you are free from my moaning.
I had the same problems. But after 2 hours it work's..... :-) I suspect, that the subscriber emails not being sent, because the testemailaccounts from the ublogsy-developer are subscribe in the posts, which i have comment. If I have write a new clean post and comment this with two different mail-adresses, it work's.
Best practises:
1. After package installation recycling your app pool 2. Edit the smpt-settings in web.config 3. edit the "contact info" and "spam settings" tab in the "uBogsy - Landing" node in content section 4. edit the three email templates in content section 5. delete all exampleposts and -comments form the package in the content section 6. create one or two new clean posts 7. create two comments with subsribe for every post and test the subscriber emails... it should work's.
Subscriber Emails and Post Comment Email confirmations
Me Again.
Sorry am testing the comment notification process and when a comment is recieved the commenter does NOT get a confirmation email. Nor does a subscriber of that post.
It just doesn't turn up.
The admin gets a confirmation email just fine.
There seems to be 3 email templates:
AdminContact - not sure what that is?
AdminCommentNotification - which works fine
CommentNotification - which presumably is for subscribers to the post
Does new comments also receieve the CommentNotificiation regardless of subscription inclusion?
I have checked the HTML and which the exception of some redundant spans all looks good.
Any ideas where to start?
If I comment and subscribe, then you comment... I only get notified of your comment when your comment is published.
Can you ensure that the new comment is published.
Then it not working...
The commenter doesn't get an email even though he has commented and if a person also makes another comment the original commenter doesn't get a email even though he has subscribed.
The email address is stored in the Subcribers (Subscription Meta Data) section on the comment form.
Can you check the umbraco log table for any errors.
Nothing in the umbracoLog table in SQL.
It's not throwing an exception As you would expect if its a syntax error in the usercontrol.
Tell a lie,
When I accepted the post I got this:
String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.SubscriptionMetaData..ctor(String subscriptionMetaDataString) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Models\SubscriptionMetaData.cs:line 23 at uBlogsy.BusinessLogic.SubscriptionService.<GetSubscriptionMetaData>b__6(String x) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 146 at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 76 at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 31
This exception is due to a crash when parsing a date time.
Can you paste the subscription meta data in the comment container here.
I have a suspision that the date format is not as expected.
As requested
Hmmm. Does the month need a leading zero?
Also it's american date format MM DD YYYY
not UK: DD MM YYYY Would that throw the exception.
Your notes suggest a differnet format:
A "\n" delimited list of subscribers in the form memberId|email|createdDate
eg. 1979|[email protected]|24/06/2011 11:16:26
I'd say that's the issue.
For some reason Umbraco/.net is saving the dates as USA format but your region settings are telling the app that you're expecting UK format.
I havent encounted this before.
Have you changed anything in the umbraco settings or web.config?
Is this happening locally or on a server?
A bit forward with this:
The localisation of the Umbraco instance was US. Subsquently the hostnames were set for US too.
So I added English UK and set the domainnames to use this.
The Subscriber list now shows up in the correct format:
However the emails STILL don't fire:
Ideas?
The date looks correct now.
I'd say some configuration now thinks that it is expecting a usa formated date.
Any chance that I could poke around in the cms?
Hi!
I got a similar error. When commenting and not ticking the "subscribe" checkbox. This error comes. I got it form the Log Manager. However notification e-mail, that I have received a comment to the post does not come still.
Object reference not set to an instance of an object.
at umbraco.cms.businesslogic.Content.CreateContent(ContentType ct)
at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String LoginName, String Email, MemberType mbt, User u)
at umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String Email, MemberType mbt, User u)
at uBlogsy.BusinessLogic.SubscriptionService.SubscribeToPost(Int32 pageId, CommentInfo commentInfo, Boolean subscribe)
in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 72
at uBlogsy.BusinessLogic.CommentService.SubmitComment(HttpRequest request, Int32 pageId, CommentInfo commentInfo, Boolean subscribe)
in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\CommentService.cs:line 119
Hi Anthony.
Sure you can. Use the same credentials. Let me know when and I'll enable it for you.
Thanks.
Zoltan
Your issue is due to a crash on this line:
Member m = Member.GetMemberFromEmail(commentInfo.EmailPrefixed) ??
Member.MakeNew(commentInfo.EmailPrefixed, commentInfo.EmailPrefixed, MemberType.GetByAlias("uBlogsySubscriber"), new User(0));
Something is not instantiated. My guess is that the MemberType is not there. Can you check the member section and see if the uBlogsySubscriber Member Type exisits.
Hey Streetly
Check out this:
http://umbraco.codeplex.com/workitem/30273
Possibly the fix?
Thank you Anthony!
I will check it out. Yet, I have commented out the referred line - prior -, so it works now.
Zoltan
What did you do exactly?
Sorry no change for me.
Same Error:
String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.Subscription..ctor(Member m, String[] items) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Models\Subscription.cs:line 80 at uBlogsy.BusinessLogic.Extensions.MemberExtensions.<>c__DisplayClass3.<uBlogsyGetSubscriptions>b__1(String[] x) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\Extensions\MemberExtensions.cs:line 31 at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source) at uBlogsy.BusinessLogic.EmailService.SendNotificationEmails(String postUrl, Int32 pageId, Int32 commentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EmailService.cs:line 82 at uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0.0.1\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:line 31
I have commented out the part, that was responsible for the Member creation, and compiled the stuff again. Replaced the dll, and vila, it works.
I don't have access to the system now, so I can not test the point you have indicated.
Any chance you could paste up the DLL
Hi!
The dll is compressed at this location.
http://ztorteli.com/uBlogsy.BusinessLogic.dll.zip
However what I did was, commenting put the lintes Anthony have mentioned above, and compiled the sources.
Honestly: I can not tell if your problem is the same or not.
Anyways it you think giving it a try, make sure to save the dll you have now, so you can paste it back in case of any problem.
Sorry guys that made no differnce to me at all.
@Streety, what language is the database user that you use to connect to the database?
I'll check
British English
From your earlier post it looks like you have the Umbraco sites set up to use the UK locale, so it shouldn't be a conflict there then (if you have the database user set to one language but the site to another, you can sometimes get odd DateTime conflicts).
You could try forcing the locale in your web config file and see if that makes a difference:
Add this to your system.web section of the site's web.config file and see if that solves the problem. If it doesn't, take it out again.
I have this:
<
globalizationculture="en-GB"requestEncoding="UTF-8"responseEncoding="UTF-8"uiCulture="en-GB" />
Globalization should have fixed it.
Perhaps the quickest solution is to get the source and do a TryParse on dates using both formats... it's dirty but i have no other suggestions.
Just had a thought.
Before you changed the ui culture umbraco would have stored dates in usa format.
You'll have to change those dates manually to uk format (the way it should be)
Actually I deleted the comments and re-created them.
The system does fire emails so I doubt its anything to do with system.mail.
I don't think this is local to me either. Its never worked from vanilla installation. It feels more like a assembly or something is missing or a path is wrong or summit.
Has anyone got it going from vanilla installation on a Windows 2008 server, IIS 7 Inetegrated .net 4 with SQL 2005?
Hmmm.
I don't think I can believe it but its bloody working now, I have no idea what I have done.
Umbraco & uBlogsy works in mysterious ways
Hmmm... You know what this says to me.
Caching
Umbraco has caching, and so does .net and IIS.
Next time, if a change in a .config file or anything that is some sort of setting does not work, try recycling your app pool.
This goes for any .net application.
No Anthony. The first thing I did was dump the cache.
I have been writing URLrewrite rules in the web.config all day which triggers a re-compile and dumps the cache. I suspect it me farting around with the Globalisation setting and your DLL writing to the members section that did it.
Very unsatifactory.
At least it works and you are free from my moaning.
That's two beers I owe you kid!
I hate unsoloved mysteries. If you ever find out what was causing all of that, please let me know.
Hi,
I had the same problems. But after 2 hours it work's..... :-) I suspect, that the subscriber emails not being sent, because the testemailaccounts from the ublogsy-developer are subscribe in the posts, which i have comment. If I have write a new clean post and comment this with two different mail-adresses, it work's.
Best practises:
1. After package installation recycling your app pool
2. Edit the smpt-settings in web.config
3. edit the "contact info" and "spam settings" tab in the "uBogsy - Landing" node in content section
4. edit the three email templates in content section
5. delete all exampleposts and -comments form the package in the content section
6. create one or two new clean posts
7. create two comments with subsribe for every post and test the subscriber emails... it should work's.
is working on a reply...