{"id":240,"date":"2009-03-24T17:42:46","date_gmt":"2009-03-24T17:42:46","guid":{"rendered":"https:\/\/www.bishnet.net\/tim\/blog\/?p=240"},"modified":"2010-11-11T13:01:23","modified_gmt":"2010-11-11T13:01:23","slug":"broken-pingbacks-whats-to-blame","status":"publish","type":"post","link":"https:\/\/www.bishnet.net\/tim\/blog\/2009\/03\/24\/broken-pingbacks-whats-to-blame\/","title":{"rendered":"Broken pingbacks &#8211; what&#8217;s to blame?"},"content":{"rendered":"<p>For a while I&#8217;ve been noticing a lack of pingbacks from people linking to me. At first I put it down to people just not linking to me, but then after discussions with a colleague today I realised I didn&#8217;t have that annoying problem of them happening when I link to my own posts. I tested further and realised they weren&#8217;t working at all.<\/p>\n<p>I debugged the issue using the good old &#8220;print debug messages all over the place&#8221; method &#8211; crude but effective. I started in xmlrpc.php and discovered that it was stopping at this line:<\/p>\n<blockquote><p><code>$comment_ID = wp_new_comment($commentdata);<\/code><\/p><\/blockquote>\n<p>This meant it was getting as far as trying to post the comment. It was then that I had a lightbulb moment. What would be stopping comments being posted? My <a href=\"https:\/\/www.bishnet.net\/tim\/blog\/2006\/04\/16\/an-end-to-comment-spam\/\">captcha to stop comment spam<\/a> (has it really been three years since I set that up?), that&#8217;s what!<\/p>\n<p>My colleague has been using a numerical captcha-style plugin called <a href=\"http:\/\/wordpress.org\/extend\/plugins\/math-comment-spam-protection\/\">Math Comment Spam Protection<\/a> (MCSP) instead. I did a quick comparison between it and the SecureImage plugin and fairly quickly found the difference. This is from the MCSP plugin:<\/p>\n<blockquote><p><code>if (\u00c2\u00a0 ( !isset($user_ID) ) &amp;&amp; ( $comment_data['comment_type'] == '' ) ) {<\/code><\/p>\n<p>\/\/ Do not check if the user is registered &amp; do not check trackbacks\/pingbacks<\/p><\/blockquote>\n<p>By comparison, the SecureImage plugin only checked if the user is registered:<\/p>\n<blockquote><p><code>\/\/ If the user is not logged in check the security code<\/code><\/p>\n<p>if ( !$user_ID ) {<\/p><\/blockquote>\n<p>The fix looks simple. But, given the lack of updates for SecureImage I decided it was time to move on. So now I have the MCSP plugin instead, and pingbacks are once again working.<\/p>\n<p>I just have one request to make. Can anyone who&#8217;s linked to me in the last three years please try again? \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For up to three years pingbacks on my blog have been broken. After finally noticing I track down the problem and find a fix.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[95,96,92,93,91,94,97],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-computing","tag-captcha","tag-comment-spam","tag-math-comment-spam-protection","tag-mcsp","tag-pingback","tag-secureimage","tag-spam"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":7,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions\/329"}],"wp:attachment":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}