Unsubscribing from a post's comments and then re-subscribing causes further comments to fail
In version 2.1.1 I've found that if you comment and subscribe to a post and then unsubscribe to that post from the link in the email you receive, then re-comment and subscribe again it causes further comments to fail.
The log will show:
String was not recognized as a valid DateTime.
at System.DateTime.Parse(String s)
at uBlogsy.BusinessLogic.Models.SubscriptionMetaData..ctor(String
subscriptionMetaDataString) in
D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\Models\SubscriptionMetaData.cs:line
23
at uBlogsy.BusinessLogic.SubscriptionService.b__6(String
x) in
D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line
146
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at uBlogsy.BusinessLogic.SubscriptionService.MetaDataContains(Int32
pageId, String email) in
D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line
163
at uBlogsy.BusinessLogic.SubscriptionService.SubscribeToPost(Int32
pageId, CommentInfo commentInfo, Boolean subscribe) in
D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line
64
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
119
The problem is due to the content of the 'Subscription Meta Data' field for the post's comments getting messed up like so:
You can see the time has been pushed to the next record.
I need to make a decision on how best to approach the upgrade.
I've done a fair bit of customisation to scripts & document types and I wouldn't want to see it all replaced by installing the new package if that's what would happen.
You'll now have multiple entries for [email protected] and I think if you continue to comment as [email protected] and tick 'Subscribe' you continue to get more entries for them.
With the craziness of xmas and everything, I thought I already fixed and released this.
I couldnt seem to replicate your issue. But I have a solid theory about why it would happen. It's to do with the meta data being not up to date. I was using DynamicNode which uses the Umbraco cache. If the cache is not updated quickly enough, and a user decides to do what you stated, there can be issues.
I've changed that part of the code to use the Document API instead, which will hit the db directly.
Unsubscribing from a post's comments and then re-subscribing causes further comments to fail
In version 2.1.1 I've found that if you comment and subscribe to a post and then unsubscribe to that post from the link in the email you receive, then re-comment and subscribe again it causes further comments to fail.
The log will show:
String was not recognized as a valid DateTime. at System.DateTime.Parse(String s) at uBlogsy.BusinessLogic.Models.SubscriptionMetaData..ctor(String subscriptionMetaDataString) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\Models\SubscriptionMetaData.cs:line 23 at uBlogsy.BusinessLogic.SubscriptionService.b__6(String x) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 146 at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source) at uBlogsy.BusinessLogic.SubscriptionService.MetaDataContains(Int32 pageId, String email) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 163 at uBlogsy.BusinessLogic.SubscriptionService.SubscribeToPost(Int32 pageId, CommentInfo commentInfo, Boolean subscribe) in D:\_PROJECTS\Personal\uBlogsy\Branches\2.1.1.0\uBlogsy\uBlogsy.BusinessLogic\SubscriptionService.cs:line 64 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 119
The problem is due to the content of the 'Subscription Meta Data' field for the post's comments getting messed up like so:
You can see the time has been pushed to the next record.
Regards,
Matt
Damn I replied to this but it didnt post.
I'll have a fix for you asap.
Thanks Anthony,
Matt
This has been fixed in 2.1.1.1
Thanks Anthony.
Are there any release notes for 2.1.1.1?
I need to make a decision on how best to approach the upgrade.
I've done a fair bit of customisation to scripts & document types and I wouldn't want to see it all replaced by installing the new package if that's what would happen.
Regards,
Matt
Upgrade instructions
- Replace Dll's
- Replace uBlogsy.config
That should be it
Hi Anthony,
I've tested this and I think the fix has introduced a new bug.
Now when you resubscribe to the post you get an additional entry in the 'Comments' 'Subscription Meta Data' field.
Then when email notifications of comments are sent out, you get multiple copies.
To replicate.
You'll now have multiple entries for [email protected] and I think if you continue to comment as [email protected] and tick 'Subscribe' you continue to get more entries for them.
Regards,
Matt
Curses!
Did this get fixed?
Sorry.
With the craziness of xmas and everything, I thought I already fixed and released this.
I couldnt seem to replicate your issue. But I have a solid theory about why it would happen. It's to do with the meta data being not up to date. I was using DynamicNode which uses the Umbraco cache. If the cache is not updated quickly enough, and a user decides to do what you stated, there can be issues.
I've changed that part of the code to use the Document API instead, which will hit the db directly.
2.1.1.2 is now available.
Sorry for the delay.
Thanks, I'll check it out.
That seems to have fixed it.
Cheers dude.
is working on a reply...