I am trying to run WP Super Cache and the debugger returns the error that there's no closing html tag (in the theme):
12:00:13 /?mcsf_action=main_css&ver=3.3.2 Cookie detected: wordpress_logged_in_308bebe324915c5539ae36e056fe8e36
12:00:13 /?mcsf_action=main_css&ver=3.3.2 In WP Cache Phase 2
12:00:13 /?mcsf_action=main_css&ver=3.3.2 Setting up WordPress actions
12:00:13 /?mcsf_action=main_css&ver=3.3.2 Supercache caching disabled. Only using wp-cache. Non empty GET request.
12:00:13 /?mcsf_action=main_css&ver=3.3.2 Created output buffer
12:00:14 /?mcsf_action=main_css&ver=3.3.2 Output buffer callback
12:00:14 /?mcsf_action=main_css&ver=3.3.2 No closing html tag. Not caching.
12:00:14 /?mcsf_action=main_css&ver=3.3.2 wp_cache_shutdown_callback: collecting meta data.
12:00:14 /?mcsf_action=main_css&ver=3.3.2 Did not write meta file: wp-cache-8f19b82fe81906cc1c76e158c677f33e.meta ** *0* **
The only information I can get from the plug-in developer is that I need to edit the 'wp_cache_eof_tags' in the plug-in file: wp-cache-phase2.php. This is what it started with:
if ( !preg_match( apply_filters( 'wp_cache_eof_tags', '/(<\/html>|<\/rss>|<\/feed>|<\/urlset|<\?xml)/i' ), $buffer ) ) {
$new_cache = false;
if( false === strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) {
wp_cache_debug( "No closing html tag. Not caching.", 2 );
$buffer .= "\n<!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->\n";
}
} else {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "robots.txt detected. Not caching.", 2 );
}
I changed the php code to this:
if ( !preg_match( apply_filters( 'wp_cache_eof_tags', '/(<\/div>|<\/rss>|<\/feed>|<\/urlset|<\?xml)/i' ), $buffer ) ) {
$new_cache = false;
if( false === strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) {
wp_cache_debug( "No closing html tag. Not caching.", 2 );
$buffer .= "\n<!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->\n";
}
} else {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "robots.txt detected. Not caching.", 2 );
}
}
The source code shows that the pages are being cached.
<!-- Cached page generated by WP-Super-Cache on 2012-06-08 11:41:08 --> <!-- Dynamic page generated in 3.111 seconds. -->
But the plug in still returns an open tag error.
13:43:38 /?mcsf_action=main_css&ver=3.3.2 Created output buffer
13:43:39 /?mcsf_action=main_css&ver=3.3.2 Output buffer callback
13:43:39 /?mcsf_action=main_css&ver=3.3.2 No closing html tag. Not caching.
13:43:39 /?mcsf_action=main_css&ver=3.3.2 wp_cache_shutdown_callback: collecting meta data.
13:43:39 /?mcsf_action=main_css&ver=3.3.2 Did not write meta file: wp-cache-6e6ae65ee14d23457d11181e8ed5af04.meta ** *0* **
Have you got any pointers as to how to solve this? Thanks.














