• When I attempt to post comments on my site, I get the following message:

    Error: This file cannot be used on its own.

    Any idea why this is happening? My sister, who is another user, is still able to comment as usual.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I am having the exact problem.

    I have just upgraded from 1.5.3 to 2.0.2. Everything else works except the comments. All my old comments remain, but no one can post new comments. When I click on the comment button, it just opens the same site page again.

    Thread Starter pearlanddotty

    (@pearlanddotty)

    There must be some sort of filter at my work, because I can post comments from my home computer just fine.

    there are a small handful of people i know who get the exact same error.

    Hi Catryan,

    I went up to 2.0.3 last week and like you am getting the same behaviour – noone can post a comment.

    Haven’t found a solution/explanation yet but will keep on plugging away!

    As per above, I’ve just stepped through the code and found the problem symptom in comments.php:
    Line 70 comments.php
    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
    You must be /wp-login.php?redirect_to=<?php the_permalink(); ?>”>logged in to post a comment.
    <?php else : ?>

    As you can see above, the variable user_ID is the culprit (although I also took the redirect to the permalink in the login url below this code – it never allowed you to login and just threw you back to the permalink).

    Even when someone goes and logs in, when they navigate back to a particular post, the user_ID variable is not set and as a result they could never post.

    As a stop gap solution, I have edited out this code to allow for user comments.

    All the best,
    Tom

    WPChina

    (@wordpresschina)

    Would this be classified as a bug, then? Maybe something that can be changed in the future?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot post comments’ is closed to new replies.