The MU forums have moved to WordPress.org

wp-comments-post.php is not progressing past the first IF statement (16 posts)

  1. alphex
    Member
    Posted 9 years ago #

    if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
    header('Allow: POST');
    header('HTTP/1.1 405 Method Not Allowed');
    header('Content-Type: text/plain');
    echo "foo";
    exit;
    }

    I added the line "echo "foo"; to find out where the code was breaking.

    When I try to post a comment, it won't get past this IF statement.

    I have no idea why not...

    Thoughts?

  2. alphex
    Member
    Posted 9 years ago #

    I just echo'ed out ... $_SERVER['REQUEST_METHOD'];
    and my method is a GET.

    Why is it trying to POST with a GET command? Now I'm really confused.

  3. alphex
    Member
    Posted 9 years ago #

    So, my "comments.php" page does this
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" class="comment_form" id="commentform">

    and passes the correct URL as the action.
    The method is POST

    but when it tries to load the page it thinks its "GET"

    The result is a blank white screen.

    Thoughts?

  4. andrea_r
    Moderator
    Posted 9 years ago #

    Try another theme, see if you get the same issue.

  5. alphex
    Member
    Posted 9 years ago #

    I do.
    Even with the default theme.

  6. alphex
    Member
    Posted 9 years ago #

    For what its worth, I have an older instance of WPMU running on a development box that is NOT suffering this problem... and I've looked at the comments.php and the wp-comments-post.php file and they appear identical for the relevent parts.

    What could be changing this request from a POST to a GET?

    Thanks.

  7. andrea_r
    Moderator
    Posted 9 years ago #

    Plugins?

  8. alphex
    Member
    Posted 9 years ago #

    I have plugins installed, but for this new blog, none of them are activated.

    I've got lightbox2, re-CAPTCHA, and the about me widget.

  9. alphex
    Member
    Posted 9 years ago #

    Anything? :)

    Thanks

  10. alphex
    Member
    Posted 9 years ago #

    Does it help that this is running behind SSL? anyone?

  11. DeannaS
    Member
    Posted 9 years ago #

    I tried it behind SSL, and it worked for me with the default theme - newest tagged version of WPMU. Which version are you using?

  12. alphex
    Member
    Posted 9 years ago #

    When was 2.6.3 released? (wpmu doesn't seem to tell you anywhere what version you're on)

    I'm pretty sure I'm on the latest release.

  13. alphex
    Member
    Posted 9 years ago #

    I just installed a brand new fresh install of wpmu 2.6.3 (downloaded today) in to a new sub directory on my server.

    I did nothing but set it up, and then I created a new blog.

    I tried to add a comment, and it failed the same as above.

    the *ONLY* thing I can think is different then a "normal" set up is that this is behind SSL, and when I submit the comment it warns me that a non secure item is being sent.

    Thoughts?

  14. alphex
    Member
    Posted 9 years ago #

    get_option('siteurl')... returns the non SSL URL of my site.
    could this be the problem?
    as in... "http://...."

    not "https://..."

    How do I get 'get_option('siteurl') to respect the HTTPS nature of my site?

  15. alphex
    Member
    Posted 9 years ago #

    found the solution from this thread.
    http://mu.wordpress.org/forums/topic.php?id=3225#post-24064

    ......

    I had a similar problem using lyceum (which is based on Wordpress) so I did the following. I added the following filters to wp-includes/default-filters:

    add_filter('option_siteurl', 'convert_https');
    add_filter('option_home', 'convert_https');

    and the following function to wp-includes/functions-formatting.php:

    function convert_https($text) {
    return str_replace("http://", "https://", $text);
    }

  16. rcwatson
    Member
    Posted 9 years ago #

    I'm not using https for my intranet site, but noticed this behavior after upgrading from 2.6.2 to 2.6.3. I don't want to apply the solution above because a) it hacks the core, which I dislike doing, and b) I don't use https.

    Any other thing this could be?

About this Topic