roborourke / wp-sass

Sass for WordPress
90 stars 24 forks source link

filemtime() error after deleting or renaming a stylesheet #9

Open ericpedia opened 11 years ago

ericpedia commented 11 years ago

After renaming some theme files, I started to get this error on all pages:

Warning: filemtime() [function.filemtime]: stat failed for /path/to/myOldStylesheet.scss in /path/to/wp-sass.php on line 119

The stylesheet that the warning refers to has been deleted (or it's name has been changed), but its cached version is still present in the WP-SASS cache folder.

The warning refers to this line of code:

    // parse if we need to
    if ( empty( $full_cache[ 'css' ] ) || filemtime( $sass_path ) > $full_cache[ 'updated' ] || $full_cache[ 'root' ] != dirname( __FILE__ ) ) {
roborourke commented 11 years ago

Ah cheers, I need to add a file exists check in. If you delete the wp-sass-cache folder in wp-content/uploads it should recompile and go back to normal.

Robert O'Rourke sanchothefat.com +44 7816 329424

rysan commented 9 years ago

Hey Robert, I am trying to use this great tool on Wordpress Multi Site, and got similar warning (although rather on line 127) on subsites that have Domain Mapping applied. For sites that have domain mapping, wp-sass creates wp-sass-cache and empty css document inside. Whereas, for subsites that have no domain mapping applied, it generates css document with css rules inside.

The warning refers to this line of code: $full_cache[ 'updated' ] = filemtime( $sass_path );