Copied to clipboard

Flag this post as spam?

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


  • Streety 358 posts 568 karma points
    Feb 15, 2012 @ 14:14
    Streety
    0

    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?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 15, 2012 @ 15:15
    Anthony Dang
    0

    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.

  • Streety 358 posts 568 karma points
    Feb 15, 2012 @ 15:24
    Streety
    0

    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.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 15, 2012 @ 18:01
    Anthony Dang
    0

    Can you check the umbraco log table for any errors.

     

  • Streety 358 posts 568 karma points
    Feb 16, 2012 @ 10:17
    Streety
    0

    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.

  • Streety 358 posts 568 karma points
    Feb 16, 2012 @ 10:21
    Streety
    0

    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

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 17, 2012 @ 19:57
    Anthony Dang
    0

    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.

     

     

  • Streety 358 posts 568 karma points
    Feb 17, 2012 @ 23:59
  • Streety 358 posts 568 karma points
    Feb 18, 2012 @ 00:08
    Streety
    0

    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:

    Subscription Meta Data
    A "\n" delimited list of subscribers in the form memberId|email|createdDate
    eg. 1979|[email protected]|24/06/2011 11:16:26
  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 18, 2012 @ 17:05
    Anthony Dang
    0

    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?

     

  • Streety 358 posts 568 karma points
    Feb 19, 2012 @ 10:48
    Streety
    0

    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:

    1371|[email protected]|19/02/2012 09:29:41
    1418|[email protected]|19/02/2012 09:42:23

    However the emails STILL don't fire:

     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

    Ideas?

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 19, 2012 @ 14:08
    Anthony Dang
    0

    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?

     

     

  • Zoltan Torteli 13 posts 34 karma points
    Feb 22, 2012 @ 22:34
    Zoltan Torteli
    0

    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

     

  • Streety 358 posts 568 karma points
    Feb 23, 2012 @ 09:09
    Streety
    0

    Hi Anthony.

     

    Sure you can. Use the same credentials. Let me know when and I'll enable it for you.

     

    Thanks.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 26, 2012 @ 20:55
    Anthony Dang
    0

    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.

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 26, 2012 @ 22:19
    Anthony Dang
    0

    Hey Streetly

     

    Check out this:

    http://umbraco.codeplex.com/workitem/30273

    Possibly the fix?

     

     

     

  • Zoltan Torteli 13 posts 34 karma points
    Feb 27, 2012 @ 00:44
    Zoltan Torteli
    0

    Thank you Anthony!

    I will check it out. Yet, I have commented out the referred line - prior -, so it works now.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 27, 2012 @ 11:10
    Anthony Dang
    0

    Zoltan

    What did you do exactly?

     

  • Streety 358 posts 568 karma points
    Feb 27, 2012 @ 11:22
    Streety
    0

    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

  • Zoltan Torteli 13 posts 34 karma points
    Feb 27, 2012 @ 13:22
    Zoltan Torteli
    0

    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.

  • Streety 358 posts 568 karma points
    Feb 27, 2012 @ 16:49
    Streety
    0

    Any chance you could paste up the DLL

  • Zoltan Torteli 13 posts 34 karma points
    Feb 27, 2012 @ 17:03
    Zoltan Torteli
    0

    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.

  • Streety 358 posts 568 karma points
    Feb 27, 2012 @ 17:46
    Streety
    0

    Sorry guys that made no differnce to me at all.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 28, 2012 @ 11:29
    Tim
    0

    @Streety, what language is the database user that you use to connect to the database?

  • Streety 358 posts 568 karma points
    Feb 28, 2012 @ 11:39
    Streety
    0

    I'll check

  • Streety 358 posts 568 karma points
    Feb 28, 2012 @ 11:40
    Streety
    0

    British English

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 28, 2012 @ 12:17
    Tim
    0

    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: 

    <globalization culture="en-GB" uiCulture="en-GB" />

    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.

  • Streety 358 posts 568 karma points
    Feb 28, 2012 @ 12:41
    Streety
    0

    I have this:

    <

     

     

    globalizationculture="en-GB"requestEncoding="UTF-8"responseEncoding="UTF-8"uiCulture="en-GB" />

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 02, 2012 @ 00:45
    Anthony Dang
    0

    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.

     

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 02, 2012 @ 13:44
    Anthony Dang
    0

    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) 

     

  • Streety 358 posts 568 karma points
    Mar 02, 2012 @ 14:18
    Streety
    0

    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?

  • Streety 358 posts 568 karma points
    Mar 08, 2012 @ 13:55
    Streety
    0

    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

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 08, 2012 @ 14:16
    Anthony Dang
    0

    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.

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 08, 2012 @ 17:43
    Anthony Dang
    0
  • Streety 358 posts 568 karma points
    Mar 09, 2012 @ 10:25
    Streety
    0

    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!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 09, 2012 @ 11:56
    Anthony Dang
    0

    I hate unsoloved mysteries. If you ever find out what was causing all of that, please let me know.

     

  • Sören Deger 733 posts 2844 karma points c-trib
    Jun 01, 2012 @ 15:32
    Sören Deger
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft