TypePad AntiSpam on UMW Blogs


Image credit: Dok1’s “Spam”

After about 3 years with Akismet on UMW Blogs we switched over to TypePad Antispam so that UMW would no longer be breaking the new licensing for Akismet—under which we would be paying $750 a month for this spam filter on a multi-site installation with 5000+ blogs (actually that quote was for 4000+ blogs back in December 2010). We were more than willing to pay something for Akismet, but the $750 figure was too rich for our blood. I understand no free lunch and all—the liberterian mantra—but that quote seemed rather extreme. I know others have tried to work out something with Akismet, and I’m not sure where that went, but I can’t see how small public colleges like mine where the WordPress blogging platform is an experiment and an afterthought can come up with $10,000 a year for spam protection. We operate on a shoe-string budget and pay less than what Akismet wanted for spam filtering to host and backup all of UMW Blogs. The sad thing is that anyone who has run a large blogging system knows that without a good spam filter the system would be crippled to the point of uselessness. We ultimately stayed on Akismet for the Spring semester because we didn’t have an alternative lined-up and really couldn’t get off Akismet before the new semester started. Luckily no one at Akismet was interested in calling us out and making us pay—and Matt seemed rather cool about looking the other way, but all the same I felt like I was doing something wrong. It was uncomfortable and I wanted out of Akismet as soon as possible.

Midway through last semester I was turned on to TypePad’s AntiSpam option for WordPress, which like Akismet was also developed by Matt Mullenweg, in fact the two seem closely related—save that one is free and one isn’t 😉 We’ve now been on Typepad’s Antispam for 12 hours now, and all is good so far save one issue we are running into. Whenever anyone posts a comment on a blog the comment takes, but in the interim this error message shows up:

Warning: stripslashes() expects parameter 1 to be string, array given in /home/umwblogs/public_html/wp-content/mu-plugins/TypePadAntiSpam.php on line 226

Warning: Cannot modify header information – headers already sent by (output started at /home/umwblogs/public_html/wp-content/mu-plugins/TypePadAntiSpam.php:226) in /home/umwblogs/public_html/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 817

Warning: Cannot modify header information – headers already sent by (output started at /home/umwblogs/public_html/wp-content/mu-plugins/TypePadAntiSpam.php:226) in /home/umwblogs/public_html/wp-includes/pluggable.php on line 934

I don’t think the Subscribe to Comments error is the cause because I deactivated that plugin and the other two errors still showed up—though I might be wrong. Anyone have any ideas how we might get around this? I also posted this same query in the WordPress MUltiSite forum to see what’s what. If get an answer there I will post it here and vice versa.

Either way, it is a huge relief to be done with Akismet, and I am more than confident we can get rid of this error and see how TypePad’s AntiSpam solution works for us. It may not be a silver bullet, but that’s allright because I am all about the pewter!

Also, my next post will be about how smoothly the upgrade went for UMW Blgos to WP 3.2.1—it was very, very nice.

This entry was posted in UMW Blogs, WordPress, wordpress multi-user, wpmu and tagged , , , , , . Bookmark the permalink.

9 Responses to TypePad AntiSpam on UMW Blogs

  1. Curt Grymala says:

    Jim,
    The problem is not related to the Subscribe to Comments plugin; that just happens to be the first place the error pops up. The problem is two-fold.

    1) Your server seems to be configured to output PHP errors and warnings. When setting cookies or session variables in PHP, those actions have to be finished before any content is output to the screen (even blank spaces). Since TypePad AntiSpam is generating and outputting an error message, when Subscribe to Comments (or any other function) tries to set a session variable or manipulate a cookie, the additional error is thrown.
    2) For some reason, an array is being passed to the stripslashes() function on line 226 of TypePad AntiSpam. Looking at that line, I can’t really imagine why anything other than a string is being passed to that function, as the data that’s being passed shouldn’t be anything other than a string. I think the best way to solve the issue is probably to replace the following code (from line 225-227):

    $query_string = '';
    foreach ( $comment as $key => $data )
    $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';

    with the following:

    $query_string = http_build_query( $comment );

    Without really digging into it (and without being able to reproduce the issue on my own server), it’s tough to say exactly what side effects may arise because of that change; but it might fix the issue. If it does, I’ll see if there’s any simple way to submit an official patch for the plugin.

  2. Reverend says:

    Curtiss,

    Thanks for the response here, just tried the code switch. And what this does is actually push my comment directly to spam—but the good news is there is no error page, at the same time there is no comment either 🙂

    Also, I am going to look into the PHP error message reporting on our server and see if I can;t figure out if that is one way to at least hide those errors for the moment.

  3. Pingback: UMW Blogs Upgraded to WordPress 3.2.1 | bavatuesdays

  4. Pingback: jimgroom » UMW Blogs Upgraded to WordPress 3.2.1

  5. Pingback: Cookies for Comments: another Spam Solution for UMW Blogs | bavatuesdays

  6. Hi there,

    I found this same error recently and tried this fix:


    foreach ( $comment as $key => $data ) {
    if ( is_string( $data ) )
    $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
    }

    That did the trick for me.

  7. Reverend says:

    Update, we went back to Akismet. Typepad Antispam not so much.

  8. Pingback: Traffic on UMW Blogs and a few notes | bavatuesdays

  9. Favio says:

    Hi, Curt, Reverend,
    I don’t understand about PHP. I’ve tried your solution… It works perfect!
    Both of you are great 🙂 Thank you, masters!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.