• Resolved spieprzajdziadu

    (@spieprzajdziadu)


    I have just upgraded from WordPress 15.1.2 to 2.0.4. Almost everything went smoothly, but I have a comment – related problem. When a user posts a comment, he/she is redirected to the “Nothing was Found” page. The comment is recorded for moderation in case of new users or posted immediately for registered users (which is ok according to my settings).
    After the upgrade I also changed from “?p=123” links to title-based links. When I change back, the problem disappears, but I’d like to keep that setting without getting errors 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • check if you have a .htaccess in your wp root folder… and while your at it is it writable by the server. if everything seems ok with it, rename it (unless you’ve edited and added your own stuff in it) and reapply your permalinks!!

    Thread Starter spieprzajdziadu

    (@spieprzajdziadu)

    mickemus, this did not solve the problem. I changed both the .htaccess and the root directory to rwxrwxrwx. I changed permalinks from “numers” to “titles” and the problem persists. Then I removed .htaccess and the result was the same. No changes were made to .htaccess by the WordPress engine.

    Thread Starter spieprzajdziadu

    (@spieprzajdziadu)

    More info coming: learned from my hosting company that they run IdeaWebServer with mod_rewrite. Just a little change to wp-includes/vars.php made WordPress write to .htaccess with the following entry:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    The blog still works fine, all links are OK, but posting a comment still ends on “Nothing was Found” page 🙁

    Thread Starter spieprzajdziadu

    (@spieprzajdziadu)

    After a lot of debugging I found out that the problem was “//” sent to wp_redirect in wp-comments-post.php (where did it come from? I don’t know). So i had to replace in wp-comments-post.php

    $location = ( empty( $_POST[‘redirect_to’] ) ) ? get_permalink( $comment_post_ID ) : $_POST[‘redirect_to’];

    wp_redirect($location);

    with

    $location = ( empty( $_POST[‘redirect_to’] ) ) ? get_permalink( $comment_post_ID ) : $_POST[‘redirect_to’];

    $output = $location[0]==”/” ? substr($location,1) : $location;

    wp_redirect($output);

    And it worked…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Nothing was Found page after posting a comment’ is closed to new replies.