comment_post_ID 0 (cannot remove from dashboard)

I’m sorry can’t comment here but i’ll try to help.

wp_handle_comment_submission function handing comments posting contains exact check for post_id:

    $post = get_post( $comment_post_ID );

    if ( empty( $post->comment_status ) ) {
         ...
       return error_happened; 
    }

i.e.
(1) it passes through , or
(2) comment was added other than default way of posting comments.

For (1) – check that post with id=0 doesnt exists in db, wp_posts table. Sometimes failures in database cause presence of such records

Leave a Comment