Title: TEMPLATEPATH Error
Last modified: August 20, 2016

---

# TEMPLATEPATH Error

 *  [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/templatepath-error/)
 * I seem to have busted my WP site (www.lyriquest.com) while editing the functions.
   php file. Replacing the functions.php with the original has no effect.
 * The error message:
    Warning: dir(TEMPLATEPATH/) [function.dir]: failed to open
   dir: No such file or directory in /home/content/26/9196326/html/wp-includes/functions.
   php on line 100
 * Fatal error: Call to a member function read() on a non-object in /home/content/
   26/9196326/html/wp-includes/functions.php on line 101
 * Here is the section of code it is trying to execute:
 * /*
    Get Available CSS */ function get_availableCss(){ $result = array(); $dir
   = dir(TEMPLATEPATH.”/”); (This is line 100) while (false !== ($file = $dir->read())){
   if(ereg(“\.css”, $file, $r)){ $result[] = $file; } } $dir->close(); return $result;}
 * The TEMPLATEPATH displayed in the error msg appears to be wrong but I can’t seem
   to figure out how to fix it.
 * Any help would be GREATLY appreciated!
 * Dan
 * _[ Duplicate [http://wordpress.org/support/topic/how-to-edit-templatepath?replies=1](http://wordpress.org/support/topic/how-to-edit-templatepath?replies=1)–
   Closing. Please continue with the original topic. ]_

The topic ‘TEMPLATEPATH Error’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [ChronicD](https://wordpress.org/support/users/chronicd/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/templatepath-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
