I had the same issue.
Upon going through the code in wp-cache-phase2.php I noticed this:
wp_cache_debug( “wp_cache_post_id_gc clearing cache in {$supercache_home}page/.” );
$supercache_home = get_supercache_dir();
prune_super_cache( $supercache_home . ‘page/’, true );
After moving the line: $supercache_home = get_supercache_dir();
to the top of this section I now no longer get the error.
Hope this helps.
I had the same issue.
But i don’t feel safe if i’ll change the core of plugin.
In my case the issue occurred when save menus in admin section.
Yes, it’s a simple fix. The lines are out of order.
In wp-cache-phase2.php line 1143, change:
wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
$supercache_home = get_supercache_dir();
prune_super_cache( $supercache_home . 'page/', true );
to
$supercache_home = get_supercache_dir();
wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
prune_super_cache( $supercache_home . 'page/', true );
-
This reply was modified 7 years, 1 month ago by sintro.
-
This reply was modified 7 years, 1 month ago by sintro.
Excellent, thanks Sintro…
Hi,
I just did this and my dev environment crashed… Anyone else?
But the error wasn’t happening in the dev environment when I was saving my menus.
Maybe if I try the fix on the production environment where the error is happening it won’t make the site crash, but it’s scary to do…
Thanks
hello!
after fixing i have another problem:
blog/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1648
Inspecting the line 1648 in wp-cache-phase2.php:
add_action( ‘gc_cache’, ‘wpsc_timestamp_cache_update’, 10, 2 );
Everything was perfect with previous version of wp-super-cache.
Wordpress doesnt work ( Help !
@alen2000 – are you using an old version of WordPress? Try the development version which fixes this problem.
https://odd.blog/y/2o