WordPress.org

Ready to get started?Download WordPress

Forums

Problem within comment-functions.php (patch included) (5 posts)

  1. racoon
    Member
    Posted 9 years ago #

    Hi, i just found the following error when upgrading:

    [Mon Jun 13 14:31:05 2005] [error] PHP Fatal error: comments_template(): Failed opening required '/usr/local/www/vhosts/blog.foxalpha.de/htdocs/wp-content/themes/men_in_grey' (include_path='.:/usr/local/lib/php:/www/templates') in /usr/local/www/vhosts/blog.foxalpha.de/htdocs/wp-includes/comment-functions.php on line 26

    This is caused by the if statement at about line 26 checking with file_exists() for a COMMENTS_TEMPLATE to include, and returns true even if not found, because file_exists() returns true on present directories, which results in static pages to be displayed only partially because it's aborting on this error.

    The following patch is fixing this:

    *** comment-functions.php.orig Mon Jun 13 14:33:54 2005
    --- comment-functions.php Mon Jun 13 14:35:09 2005
    ***************
    *** 22,28 ****

    define('COMMENTS_TEMPLATE', true);
    $include = apply_filters('comments_template', TEMPLATEPATH . $file );
    ! if ( file_exists( $include ) )
    require( $include );
    else
    require( ABSPATH . 'wp-content/themes/default/comments.php');
    --- 22,28 ----

    define('COMMENTS_TEMPLATE', true);
    $include = apply_filters('comments_template', TEMPLATEPATH . $file );
    ! if ( file_exists( $include ) && is_file( $include ) )
    require( $include );
    else
    require( ABSPATH . 'wp-content/themes/default/comments.php');

    This adds is_file() to the check and thus makes sure that the default/comments.php is loaded when $file is a directory and no file.

    Please apply :)

    Regards,
    Frank

  2. racoon
    Member
    Posted 9 years ago #

    *warg* WordPress is breaking the diff() format, so please check the patch from this url: http://blog.foxalpha.de/wp-comment-patch.txt

  3. racoon
    Member
    Posted 9 years ago #

    I just updated to wordpress-1.5.1.3 and found out that this bug has not been fixed yet. So, is there a better place to post bugfixes or has it just been overseen or has it just been ignored? Whom can i give the pointy hat to? :)

  4. skippy
    Member
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags