Ready to get started?Download WordPress


Problem in comment-functions.php? (5 posts)

  1. Lucky1
    Posted 9 years ago #

    I think I have found a bug in the newes nigthly built(12.02.2005).
    In the comment-functions.php at line 23-26:
    if ( file_exists( TEMPLATEPATH . $file )
    require( TEMPLATEPATH . $file );
    require( ABSPATH . "wp-content/themes/default/comments.php");

    That if-function loads the "wp-content/themes/default/comments.php" only. It's doesn't load any other comments.php because $file is empty.
    It works when you use:
    if ( file_exists( TEMPLATEPATH . "/comments.php") )
    require( TEMPLATEPATH . "/comments.php");
    require( ABSPATH . "wp-content/themes/default/comments.php");

    Should I added it in the mosquito Bugtracker?

    - bjoern

  2. Yes, bugs should be reported to the bugtracker. Bugs reported solely on the forum stand a high risk of falling through the cracks.

    However, what you're reporting doesn't appear to be a bug. The function comments_template() sets the default for $file to be "/comments.php". All WP calls to comments_template() do so without an argument, so the default would be used. Which leads me to wonder... in your template, what does the call to comments_template() look like? If you sending an argument, is it something other than a comments template filename?

  3. dcdulong
    Posted 9 years ago #

    I've noticed something really strange within the past four nightly builds. It appears that only the comments.php file in /wp-content/themes/default is being loaded, even though I have a comments.php file in my own template directory (/wp-content/themes/upanddown). It was working fine a few nightlies ago.

    I can verify this by editing the "default" comments.php file and seeing the changes right away, whereas editing mine makes no impact on my blog. Any ideas?

  4. dcdulong
    Posted 9 years ago #

    By the way, I'm currently running 1.5-gamma 2005-02-14 but I noticed this problem about four nightly builds ago...

  5. dcdulong
    Posted 9 years ago #

    Got it. Turns out comments_template() now has a default argument of is_single(). Removing the argument made everything all better.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.