WordPress.org

Support

Support » How-To and Troubleshooting » wp-comments-post.php problem

wp-comments-post.php problem

  • I’m having problems with posting comments. Nobody can post comments, because after writing them the wp-comments-post.php page ends up being white & a dead end. No code, no error.

    Help! This worked until I changed my layout!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Bump

    I’m having the same problem, but it’s not the theme.

    Truantrebel, have you tried commenting with the WP default theme? I did, and still have the problem. I just get stuck at wp-comments-post.php and the redirect to the post doesn’t happen. No comment is posted either.

    I have looked at what seems like everything on teh internets to figure this one out.

    I don’t even remember why I thought it had to do with the 2.3 canonical URL change, but I played around with that to no avail as well (that isn’t a problem; I did a backup before I edited the htaccess file so I wouldn’t compound the problem).

    Help please, anyone?

    I tried a comment with IE, and found it’s a 405 error.
    Not that it’s solved anything, but it’s another clue, I guess.

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    Very few things generate a 405 error. WordPress is not one of them.

    Are you running mod_security on your server?

    I couldn’t tell you for sure. What’s that look like?
    I do have certain files and the directories protected in .htaccess, if that means anything.

    Actually, my issue is probably because I have two blogs with different URLs on my server, but the main blog works fine with a nearly identical .htaccess file (domains changed, of course). I don’t wanna hijack truantrebel’s thread, though–I’m sort of hoping something will give me an aha! moment, ’cause I’m pretty stumped.

    It works now! Thanks Otto!

    What I did (for anyone else with the problem, if you have a similar setup)–
    I just had to change my WordPress URL in Admin/Options. I had it set to http://mainblogurl.com/addondomainurl.com/ and I changed it to http://addondomainurl.com (just as the blog address URL was).

    Thanks again!

    We are having a similar problem; also we cannot login into our accounts (unless it is already cached). We are yet to identify the cause! So do not know how to solve the problem. We have tried the suggestion, but it didn’t work.

    My problem is like this: When I’m loged and don’t write anything I have The website cannot display the page HTTP 500. Wp is 2.5.1 and page is /wp-comments-post.php. No idea.

    I experienced the same problem as leonl, but it happened when the visitor was not loged in. So nobody could comment on my blog. I don’t know what to do, but while i don’t find an answer I have to use Disqus.

    I’m having this problem as well. I thought it may be my old theme, but I’ve checked through everything and there isn’t anything wrong with it..

    This is only happening to people that are not registered. They are usually on IE as well. I checked it in IE logged out and ended up with the 405 error as well as a 500 error.

    Unlike bama, my blog is already set up with the proper URL.

    Also, if one that has the error refreshes the page and tries to comment again, it usually goes through.

    I’m attempting to find a plugin that can correct the problem, but I haven’t found anything as of yet.

    i am also having same problem
    my site 100india.com

    techiesouls

    @techiesouls

    i also had the same problem but one of my friend suggested me to update to new version but it also did’t worked i backed up my DB and fresh installed the latest version and my problem solved you can have a look here TechieSouls

    janebush08

    @janebush08

    i am also having same problem

    net framework development

    TrashMajor

    @trashmajor

    And the same. I have last version of wordpress (2.6.1) installed first time at the domain.

    tearoom

    @tearoom

    OK, just had this same issue, and fixed it with a bit of PHP, right under the comment

    $user = wp_get_current_user();
    if ( $user->ID ) {
    	$comment_author       = $wpdb->escape($user->display_name);
    	$comment_author_email = $wpdb->escape($user->user_email);
    	$comment_author_url   = $wpdb->escape($user->user_url);
    	if ( current_user_can('unfiltered_html') ) {
    		if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
    			kses_remove_filters(); // start with a clean slate
    			kses_init_filters(); // set up the filters
    		}
    	}
    } else {
    	if ( get_option('comment_registration') )
    		wp_die( __('Sorry, you must be logged in to post a comment.') );
    }

    I changed this to:

    $user = wp_get_current_user();
    if ( $user->ID ) {
    	$comment_author       = $wpdb->escape($user->display_name);
    	$comment_author_email = $wpdb->escape($user->user_email);
    	$comment_author_url   = $wpdb->escape($user->user_url);
    	if ( current_user_can('unfiltered_html') ) {
    		if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
    			kses_remove_filters(); // start with a clean slate
    			kses_init_filters(); // set up the filters
    		}
    	}
    } else {
    <strong>	echo("Oops, looks like you didn't <a href=\"http://www.YOURDOMAINNAME.com/wp-login.php\">register (or sign in)</a>!");</strong>
    
    	if ( get_option('comment_registration') )
    		wp_die( __('Sorry, you must be logged in to post a comment.') );
    }

    This assumes wp is under the main directory, if you need to put a sub directory, change the url http://www.YOURDOMAINNAME.com/wp-login.php to http://www.YOURDOMAINNAME.com/YOUR_SUB-DIRECTORY/wp-login.php

    This might cause some other unforseen issue, but so far I haven’t come across one (please let me know if you do!)

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘wp-comments-post.php problem’ is closed to new replies.