cherty
Forum Replies Created
-
I just tried the development version and it seemed to work well on my test website. The if statement on Line 28 seems to have solved my problem:
if ( $blogcacheid != '' ) $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) );The dev version is at http://downloads.wordpress.org/plugin/wp-super-cache.zip and was referenced on another forum item that you posted (http://wordpress.org/support/topic/plugin-wp-super-cache-issue-with-scheduled-posts-not-showing-up).
Debug on and php_error_log showed no errors. Test cache works fine and the two statements at the bottom of View Source pages display fine.
Thanks so much, Donncha.
Thanks. Here is what I added (lines 19 through 29):
} else { $request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) ); if( strpos( $request_uri, '/', 1 ) ) { if( $base == '/' ) { $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); } else { //error_log( $_SERVER[ 'REQUEST_URI' ] . " $blogcacheid\n", 3, "err.txt" ); // test code added 6-20-12 error_log( "$request_uri $base $blogcacheid\n", 3, "err.txt" ); // test code added 6-21-12 $blogcacheid = str_replace( $base, '', $request_uri ); $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); }Here is how I navigated:
Login, Homepage, Homepage Dashboard, Network Dashboard, Homepage, Blog Site, Blog Site Dashboard, HomepageHere is the output to err.txt:
/wp/wp-login.php /wp/ blog /wp/wp-login.php /wp/ blog /wp/wp-login.php /wp/ blog /wp/wp-login.php /wp/ blog /wp/ /wp/ blog /wp/ /wp/ blog /wp/bcc-news/ /wp/ blog /wp/bcc-news/ /wp/ blog /wp/ /wp/ blog /wp/bcc-news/ /wp/ blog /wp/ztest/ /wp/ blog /wp/ztest/ /wp/ blog /wp/ztest/page-1/ /wp/ blog /wp/ztest/page-1/ /wp/ blog /wp/ /wp/ blog /wp/bcc-news/ /wp/ blogNote – The Test Cache works fine, and the two lines of cache code appear at the bottom of web pages using View Source.
Not sure if I am giving you what you want to see.
Thanks for all your help.Thank you for your quick reply. Sorry it’s taken so long to get back.
I reinstalled the WordPress site on my test xampp server, then network activated WP Super Cache. With debug on from the wp-config.php file, these two messages displayed in the browser:
Warning: strpos() [function.strpos]: Offset not contained in string in C:\xampp\htdocs\wp\wp-content\plugins\wp-super-cache\wp-cache-base.php on line 26Notice: Undefined variable: cache_wptouch in C:\xampp\htdocs\wp\wp-content\plugins\wp-super-cache\plugins\wptouch.php on line 109After setting caching on and using mod_rewrite, I added your error_log code to the plugins/wp-super-cache/wp-cache-base.php file (lines 19 through 28, sorry about indents below):
} else { $request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) ); if( strpos( $request_uri, '/', 1 ) ) { if( $base == '/' ) { $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); } else { error_log( $_SERVER[ 'REQUEST_URI' ] . " $blogcacheid\n", 3, "err.txt" ); // test code added 6-20-12 $blogcacheid = str_replace( $base, '', $request_uri ); $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); }I visited these pages:
1. Homepage
2. Homepage Dashboard
3. Network Dashboard
4. Homepage
5. Blog Site
6. Blog site Dashboard
7. HomepageHere is the err.txt output for the pages I visited:
/wp/ blog
/wp/bcc-news/ blog
/wp/ blog
/wp/bcc-news/ blog
/wp/ztest/ blog
/wp/ztest/page-1/ blog
/wp/ blog
/wp/bcc-news/ blogThanks.