• Lucky1

    (@lucky1)


    Hi,
    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 );
    else
    require( ABSPATH . "wp-content/themes/default/comments.php");
    endif;

    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");
    else
    require( ABSPATH . "wp-content/themes/default/comments.php");

    Should I added it in the mosquito Bugtracker?

    – bjoern

Viewing 4 replies - 1 through 4 (of 4 total)
  • Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    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?

    dcdulong

    (@dcdulong)

    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?

    dcdulong

    (@dcdulong)

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

    dcdulong

    (@dcdulong)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem in comment-functions.php?’ is closed to new replies.