Turns out that I’d accidentally got an extra redirect statement in the .htaccess file for the blog that required the comment submission to come from this site’s url to prevent some automatically submitted spam. Unfortunately, it had been added to this site but included our development site’s url. Which means it would never allow any comments to reach WordPress.
Lesson: Also check the .htaccess file.
Normal service is resumed.
You may have noticed if you’ve tried to submit a comment to this site recently that it hasn’t worked since I moved servers. I was feeling quite smug at the complete lack of spam submissions and assuming that bad_behaviour was killing everything before it got to WordPress but eventually, a complete lack of any comments for weeks got my attention.
Clearly the problem exists on my end: instead of submitting the comment, the comment script is redirecting the visitor back to their own ip address. Where no web server exists. And the request times out.
However, I’ve drawn a complete blank about how that is happening,
I’ve reinstalled WP from the dashboard and checked all the plugins are up-to-date
I’ve checked that my working test site shares the same code as the public site
I’ve tried deactivating all the plugins and reverted to the twenty-eleven theme
I’ve tested comment submission from more than one IP address and computer
My traffic logs for this vhost show incoming comment requests (from me and others) but no comments are visible in the WP dashboard
all without affection the faulty comment submission.
Does anyone know what is causing WordPress to redirect the form submission back to the browser’s ip address?
Obviously, commenting on this post is probably a waste of time (though you’re welcome to try) so If you can help, please email me at email@example.com
Here’s what does happen on my development site when a comment is successfully submitted — hosted on the same server and on the served to the same IP address as the live site and running the same WordPress version and plugins:
Status Code:302 Moved Temporarily
bb2_screener_:**(bb2 nonce)** **(my ip address)**
Cache-Control:no-cache, must-revalidate, max-age=0
Date:Wed, 01 Aug 2012 17:24:10 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified:Wed, 01 Aug 2012 17:24:10 GMT
Set-Cookie:comment_author_**(wp nonce)**=My+Name; expires=Sun, 14-Jul-2013 22:44:10 GMT; path=/blog/, comment_author_email_**(wp nonce)**=contact%40def-proc.co.uk; expires=Sun, 14-Jul-2013 22:44:10 GMT; path=/blog/, comment_author_url_**(wp nonce)**=deleted; expires=Tue, 02-Aug-2011 17:24:09 GMT; path=/blog/
But instead, on the live site, this happens:
Status Code:302 Found
Date:Wed, 01 Aug 2012 17:34:41 GMT
Location:http://**(my ip address)**/
Edit: Comments are now working again.