Support » Fixing WordPress » [Plugin: WP Super Cache] wp-cache / super-cache not caching due to theme

  • Hi there,

    So I’ve been reading through all the trouble shooting for a day or so and I’ve tried everything that seemed relevant to me in the troubleshooting to no avail.

    then i throw a hail mary into the endzone and try swapping out my themes from my custom theme, to the classic theme. voila, caching starts working.

    How do I find out what functionality is conflicting with my custom theme and wp-cache/supercache?

    I added the line error_log(); to my advanced-cache.php but i don’t see any errors in my php errors_log (that is where I would look right?).

    Any help would be greatly appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • actually, looks like i figured it out. i went through the index for the theme and just started commenting pieces out until i saw files in the cache. after commenting out the sidebar I saw that the cache dir starting populating.

    so i started commenting parts of the side bar out that had any php/wp functionality.

    in my sidebar i had:

    <? virtual (“/includes/80×80.html”); ?>

    when i commented that out, my site started caching again even with the rest of the sidebar.php code in tact.

    I changed that line to

    <? include “includes/80×80.html”; ?>

    and now caching works in its entirety. I just thought I’d share the solution, maybe it will help someone else who is banging their head on the wall ;).

    That was a PHP error stopping your PHP process from finishing and therefore the cache couldn’t be written out. I wonder if I can add some debug code for that.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Not necessarily an error. virtual flushes all the buffers back to Apache and has Apache do a mod_include. Meaning that the output buffering you’re using they might have been empty when it got to the cache. The headers would have certainly been flushed out of the buffer.

    I don’t see any way to check for it other than looking through all the theme files for keywords like “virtual” and other ones that may be a problem.

    Doh! You’re right. I don’t think I’ve used virtual().

    There may be a way of testing for it. I’d need to create a “Troubleshooting” button, but it could set a key of some sort at the start of a page request and if the request finishes properly the key would be deleted.
    If the key ever existed before a particular request then we’d know something went wrong.

    ‘Course the interesting bit is coding the key and figuring out what to base it on. ie. REQUEST_URI, $current_user..

    If “80×80.html” contains no PHP code, it needn’t be parsed by PHP. Use:

    readfile('includes/80x80.html', true);

    If their were a PHP error wouldn’t it say so?

    WP-Supercache is also not working for me.

    MrApples – it wasn’t a PHP error, see Otto42’s post above. Have you tried debugging it?

    Yes, I followed all the debugging instructions included in the readme.

    WP-Cache is working (but only caches 6 pages), Supercache does nothing.

    In the error log I could not find anything from WordPress.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP Super Cache] wp-cache / super-cache not caching due to theme’ is closed to new replies.