[wp-hackers] wp-comments-post.php & file upload problem

Mark Cunningham mark.cunningham at gmail.com
Tue Feb 26 09:23:31 GMT 2008

On 25/02/2008, Beth Cleaver <cleavere at bellsouth.net> wrote:
>  My problem*:  I can't comment on mccainblogs.com; I get the dreaded
>  blank screen stuck on wp-comments-post.php, no redirect to the original
>  post, and no comment gets posted.  I've seen this issue in the WP forums
>  and elsewhere around the internets, but I can't find a solution that
>  applies even closely enough to help me figure it out.

I don't know if this is the same thing I found on my blog (wp-2.3.3)
but I found, occasionally, people would try to submit a comment and
would get a blank screen. Tracked it down to the comment form in my
theme. In my "comments.php", I had, right down the bottom of the form
this line:

<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

For some reason "$id" would be empty sometimes, particularly for
non-logged in users. I replaced it with this:

<input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />

And the problem seemed to go away.


More information about the wp-hackers mailing list