1.4 Delete page from cache does not work (with patch)
-
The delete page from cache button does not work. I debugged that a little and I believe there is a slash-issue in the code. Here’s my fix:
--- wp-cache.php.orig 2014-01-29 18:01:41.000000000 +0200 +++ wp-cache.php 2014-01-29 18:54:20.000000000 +0200 @@ -392,7 +392,7 @@ if ( function_exists('current_user_can') && false == current_user_can('delete_others_posts') ) return false; if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'delcachepage' && ( isset( $_GET[ '_wpnonce' ] ) ? wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'delete-cache' ) : false ) ) { - $path = get_supercache_dir() . preg_replace( '/:.*$/', '', $_GET[ 'path' ] ); + $path = trailingslashit( untrailingslashit( get_supercache_dir()) . preg_replace( '/:.*$/', '', $_GET[ 'path' ] ) ); $files = get_all_supercache_filenames( $path ); foreach( $files as $cache_file ) prune_super_cache( $path . $cache_file, true );
The topic ‘1.4 Delete page from cache does not work (with patch)’ is closed to new replies.