I used the Simple Trackback Validation plugin for a while until I noticed these errors showing up in php_errors.
PHP Fatal error: Cannot instantiate non-existent class: snoopy in /home/www/wp-content/plugins/simple-trackback-validation/simple-trackback-validation.php on line 158
This morning I decided to fix it as the spammers have been going crazy. I spotted dozens of POST requests to trackbacks as I tailed my log files.
How to fix the plugin:
- Open simple-trackback-validation.php in a text editor and go to line 158. It should be this line:
$stbvSnoopy = new Snoopy;
- Above that line, add the folloing line:
include_once( ABSPATH . 'wp-includes/class-snoopy.php' );
- Save the file and upload to your host again.
It’s no substitute for Akismet but along with Cookies for comments it should help keep your blog spam free!
Or, as I’ve just done because this blog is being inundated with trackback spam right now (over 17,000 in the last 9 hours), I blocked off access completely with this rewrite rule. Any WordPress blog will send a pingback anyway and MT even supports pingback now!
RewriteRule ^(.*)/trackback/ - [F]
17 thoughts on “Slow down trackback spam with Simple Trackback Validation”
So this plugin was broken for a while? Do you remember when it broke? During WP 2.3.x or WP 2.5?
It’s working fine for me in WP2.3.x. I’ve been swearing by this plugin for a while now, so it’s good to see it getting some exposure.
I might look into installing it on my blog then. I’m still on WP 2.3.3. The changes Donncha mentions is probably a WP 2.5 compatibility fix (right?).
I was testing 2.5 for a while so it probably is a 2.5 issue. Very useful plugin too!
Note that if you copy and paste the additional line directly from the above blog URL, you’ll get high-ASCII curly quotes that will result in this error message:
Parse error: syntax error, unexpected T_CLASS in /home/gagne2/public_html/showbits/wp-content/plugins/simple-trackback-validation.php on line 158
Ken – thanks for commenting, I changed the apostrophes to html entities according to the Writing code in your posts Codex page. Looks like it’s copy/pastable again!
I’ve actually had this problem with the Simple Trackback Validation plugin since I upgraded to WordPress 2.3 and finally got fed up and quit using it when the plugin’s author stated he hadn’t ever heard of it before. It doesn’t look like it’s even under development any longer.
Thanks for fix though. It’s much appreciated.
I’m getting ~50,000 spam hits a day, so I’ll definitely be checking this out. Thanks.
I noticed Snoopy is not included as part of the plugin package. I also do not have Snoopy in /wp-includes/. I didn’t see any indication in the instructions that I needed to do so, but do I need to download and install Snoopy as well?
Paul – the file is wp-includes/class-snoopy.php and I just checked a new 2.5 install and it’s there. Check again!
Wow! Must have been a 1D10T problem… disconnect between my seat and keyboard. The file is there… dunno how I missed it. Thanx!
Arg, I fixed this myself in a not too dissimilar way as a hack after seeing these in my error log. I have been so busy lately (recovery from LASIK on eyes etc) to release or announce this but I had planned and I am glad you did. Kudos.
Thanks! Since I upgraded to WP2.7 I was suffering with this error in another plugin. It lacked the include line (but it worked till now, don’t now why). Now it works again.
Lot of thanks!