WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Comment form is not displayed (5 posts)

  1. jyx34
    Member
    Posted 7 years ago #

    When viewing an individual post on my blog the comments form is not displayed. Clicking on the Comments link at the bottom just reloads the page, but there is no way to enter a comment.

    Please note this is a different problem from the many topics that have trouble submitting a comment. In this case no comment can be submitted since there is no form.

    I have changed to many different themes. The problem is present on all themes. I've deactivated all plugins, which has no effect. I just upgraded from 2.1 to 2.2 without any change.

    I'm no PHP expert, but presumably the comments_template() function in single.php is returning without writing the form or is otherwise broken.

    Here's a link from the blog. Try clicking the comment link at the bottom:
    http://www.nichesoftware.org/2007/06/01/

    Any hints great appreciated! Thanks.

  2. jyx34
    Member
    Posted 7 years ago #

    OK, it's more or less fixed, though I basically hacked it back together. I have no idea what got so futzed up even with a fresh install and a freshly loaded default theme with no activated plugins.

    I basically had to put a call to comments_template(); into archive.php, and then comment out a line in that function that was returning without displaying the comments and form. Oh, and I had to manually fix the inconsistent link anchors for the comments section.

    I'm sure this is technically wrong since I altered the function so it always displays the comments instead of fixing the underlying problem (which I never discovered). But it works now. If anyone has insight into the underlying problem feel free to post it. Otherwise my hack will have to do.

  3. moshu
    Member
    Posted 7 years ago #

    I assume that happened because you are using a very custom (and insufficient) permalink structure, namely:
    example.com/2007/06/03
    WP "percieves" it as a daily archive not as single post! - and, of course, doesn't want to display the comment form, which is due only on single post view.

    I bet if you revert back to an unhacked version AND change your permalink structure to something that has either the post title or post ID... it will work.

  4. jyx34
    Member
    Posted 7 years ago #

    Ah, the permalink structure. Yes, that's the one thing that persisted through all my changes, and was responsible for the comments link not working. I guess I should have realized that from looking at the code, but never having worked with PHP before it was slow reading.

    I just changed to the "Date and name based" permalink structure, backed out my changes, and it works perfectly.

    Thanks for the tip!

  5. Ascendancy
    Member
    Posted 6 years ago #

    I have mine at the Dane and name based structure, but I have the same problem on my blog.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags