Title: Problem within comment-functions.php (patch included)
Last modified: August 18, 2016

---

# Problem within comment-functions.php (patch included)

 *  [racoon](https://wordpress.org/support/users/racoon/)
 * (@racoon)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/)
 * 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

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [racoon](https://wordpress.org/support/users/racoon/)
 * (@racoon)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/#post-219383)
 * *warg* WordPress is breaking the diff() format, so please check the patch from
   this url: [http://blog.foxalpha.de/wp-comment-patch.txt](http://blog.foxalpha.de/wp-comment-patch.txt)
 *  Thread Starter [racoon](https://wordpress.org/support/users/racoon/)
 * (@racoon)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/#post-219638)
 * 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? 🙂
 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/#post-219639)
 * [http://trac.wordpress.org/](http://trac.wordpress.org/)
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/#post-219640)
 * [http://codex.wordpress.org/Submitting_Bugs](http://codex.wordpress.org/Submitting_Bugs)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem within comment-functions.php (patch included)’ is closed to new
replies.

## Tags

 * [bugfix](https://wordpress.org/support/topic-tag/bugfix/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/problem-within-comment-functionsphp-patch-included/#post-219640)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
