• I’ve been seeing a very strange problem with v1.5.1.x Whenever my site receives a pingback or trackback (sending them work sfine), they never show up. However looking through the logs and the database, the comment for the ping or trackback IS created in teh system but then, for some reason, its deleted. Why would it do that?

    When I got an email indicating someone had pinged or tracked a post, I couldn’t figur eout why it wasn’t showing up on teh site. The email showed anew commetn ID had been assigned, even provided a link to delete the comment. Spam Karma 2 logs showed the comment had been processed and approved with flying colors (I disabled SK2 and the same thing is happening) If I look in the database in the wp_comments table – I can see the auto_increment counter incrementing with each comment. So for an instant – the comment is created in the database, but is then immediately deleted and there is no trace of it anywhere. I don’t have any other spam prevention plugins enabled. I can’t figur eout why this would happen. I’ve checked my options in the Discussion section – nothign seems like it woudl make WP do this. Has anyone else seen this behavior? Normal comments that you post from teh entry are handled just fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter baptiste

    (@baptiste)

    Sigh never mind – I had SecureImage activated as a plugin. RedAlt ping-o-mation showed me ‘Invalid Security Code’ heh – why in teh world is that tripping on trackbacks and pingbacks. I really like SecureImage so I’m going to be debuggin git and fixing it. At least my pingbacks will work again!

    Thread Starter baptiste

    (@baptiste)

    So if you’re using the SecureImage plugin, it will reject every pingback and trackback you get since it doesn’t do any kind of check for comment type in the post processing. Here is a patch that will take the comment_type into account. Note I’m doing a DB query – I couldn’t find anywhere the comment_type might already be in post processing (not very familiar with the WP APIs yet) so if there is a global var somewhere that would still be set in post processing, let me know. Anyway, here is a simple patch for the plugin that will get trackbacks and pingbacks through SecureImage:

    *** secureimage.php.orig 2005-06-08 19:29:09.000000000 -0400
    — secureimage.php 2005-06-08 20:32:54.000000000 -0400
    ***************
    *** 234,239 ****
    — 234,243 —-

    // If the user is not logged in check the security code
    if ( !$user_ID ) {
    + // Grab the comment type from the database to ensure we only check comments
    + // Is there anywhere the comment type can be found in a global var to save a DB check? I can’t find it.
    + $comment_type = $wpdb->get_var(“SELECT comment_type FROM $wpdb->comments WHERE comment_ID = $post_ID”);
    + if ($comment_type == ” || $comment_type == ‘comment’) {
    // puke on an empty code
    if ( ” == $securitycode )
    die( __(‘Error: please enter the security code.’) );
    ***************
    *** 247,253 ****
    } else {

    $wpdb->query(“DELETE from $wpdb->secureimage WHERE img_name = ‘$securitycode'”); //were ok, delete the image from db
    !
    }
    }

    — 251,257 —-
    } else {

    $wpdb->query(“DELETE from $wpdb->secureimage WHERE img_name = ‘$securitycode'”); //were ok, delete the image from db
    ! }
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ping/TrackBack Comments created and immediately deleted – why?’ is closed to new replies.