codethinked (kōdthĭngked) adj. To be consumed by or obsessed with code.

Bug in my BlogEngine.net Akismet Extension

So, I have been having problems for a while now with my blog not accepting comments from people that don't enter a website into the comment form. Well, I wasn't sure why this was happening, and I finally had a chance to trace down the issue. It took all of 10 seconds once I remembered to look for it, and embarrassingly it was my own code. Mea Culpa. Anyways, it all had to do with the fact that I was not checking the website property on the comment object for null before I made this assignment:

askimetComment.CommentAuthorUrl = comment.Website.OriginalString;

Geez. I have no one to blame but myself for not testing this properly, and I sincerely apologize to anyone that used the extension and has lost comments due to it. I have fixed it and updated the latest zip. You can grab it here:

BlogEngine.net 1.4 Akismet Extension

Comments

Anil

Hey Justin, I work wtih the team at Six Apart that makes TypePad AntiSpam, and after seeing your post thought I'd drop you a line to see if you wanted to update your library to support the service.

TypePad AntiSpam is a free service for blocking blog spam, and unlike Akismet, it's free no matter what you do with your blog, and the engine is open source. Best of all, it's 100% compatible with the Akismet API, so it should be easy to update your library.

If you're interested, drop me a line, or just check out http;//antispam.typepad.com/ and see for yourself. Smile

Anil

September 6. 2008 18:09

United States
Justin Etheredge

@Anil Yeah, definitely, I'd be very interested in making it worked with TypePad AntiSpam. I'll look into the API and see how much work it will take. Thanks!

Justin Etheredge

September 6. 2008 18:19

United States
PoiSoN

Hi, thanks for your extension!

It seams to work, but how/where can I see what comment were blocked and how can I control it?

PoiSoN

September 14. 2008 11:43

Justin Etheredge

It currently does not support viewing comments that were marked as spam. Akismet is very accurate, but it probably will catch the occasional false positive.

Justin Etheredge

September 14. 2008 12:34

United States
trackback

Trackback from Web Development Community

CodeThinked | Bug in my BlogEngine.net Akismet Extension

Web Development Community

December 2. 2008 01:21

John Oswalt

I am having issues with your Extension on version 1.4.5 of BlogEngine. Whenever I try to save a comment with the Akismet extension enabled, the comment area just spins and never saves the comment. I am storing my posts as XML and not in a database.

If I disable the extension, I can save without any problems. Are you aware of this problem in version 1.4.5?

Thanks,

John Oswalt

December 22. 2008 13:16

United States
Justin Etheredge

@John The reason why it does this is because an exception gets thrown while the comment is saving. Do you have a development environment setup locally? If so then I would put a breakpoint in the "Post_AddingComment" section of the extension and see if you can spot where it is being thrown. Other than that I would tell you to verify your api key for Akismet.

Justin Etheredge

December 22. 2008 13:59

United States
JohnB

Hi Justin,
Sorry if this is dumb question, but when you say edit AkismetExtension.cs with blog url and api key do you mean these lines?

        settings.AddParameter("apiKey", "api Key");
        settings.AddParameter("blogUrl", "blog Url");

My 'saving the comment...' is just spinning, 1.4.5
Thanks,
John

JohnB

March 24. 2009 06:46

Canada
Justin Etheredge

@JohnB In the latest version of BlogEngine.net, those settings should be setup in the admin side of the site. When you go into the plugin settings. You shouldn't need to configure anything in the code.

Justin Etheredge

March 24. 2009 08:28

United States
JohnB

Justin,

Thanks!

It's working now. I was missing the http:// in front of my URL.

All the best,
John

JohnB

March 24. 2009 11:25

Canada
Jason Short

Sadly, the post right before mine is obvious spam that got through your system somehow. Frown

Thanks for sharing the extension though.  I am looking to do the same for my blog, getting hammered with spammers these days.

Jason Short

May 30. 2009 16:08

United States
Justin Etheredge

@Jason Yep, I probably still get one or two a week that get through, but I just chalked them up to misses with my spam filter or manual spam by someone being paid to leave comments. Overall though I have heard that the amount I receive is excellent compared to most people, so I figure that something is working Smile

Justin Etheredge

May 30. 2009 16:49

livechat operators

I hope you can easily resolve your problem about that.

livechat operators

June 1. 2009 01:20

United States
Affordable SEO Companies

On this post, I have really learned a lot. This really helps me to find the answers to my question. Hoping that you will continue posting an article having a useful information. Smile

Affordable SEO Companies

June 1. 2009 03:46

United States

Add Comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading