WP Super Cache
WP Super Cache not working _ Debug mode shows nothing (9 posts)

  1. pixeline
    Posted 3 years ago #

    I've used WP Super Cache on several others installations without issue, but in this one case, the cache is not working (the test provided by the plugin confirms this) and setting Debug to ON does not change anything: there is no message in the html source code.

    Any idea as to what is wrong on this setup?


  2. pixeline
    Posted 3 years ago #

    I noticed my homepage breaks if WP Super Cache's caching is activated. In the error_log i get this:

    [14-Aug-2012 23:16:14] PHP Fatal error:  Cannot use object of type WP_Query as array in /domain/path/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1154
    [14-Aug-2012 23:16:14] PHP Fatal error:  Call to a member function get() on a non-object in /domain/path/wp-includes/cache.php on line 113

    I guess it's probably related. I developed my own theme and have some custom loops on the frontpage. Could that be it?

  3. phirefly
    Posted 3 years ago #

    As a non-developer I'm not sure if my problem is related, but it is similar; no error messages, however the plugin has zero effect on caching or serving CDN (been through setup several times). I believe we also have some custom loops on various pages. Also tried changing themes; no luck :(

  4. phirefly
    Posted 3 years ago #

    Also tried W3TC & had similar results - did you try any other caching plugin?

  5. Donncha O Caoimh
    Plugin Author

    Posted 3 years ago #

    pixeline - that line 1154 queries the $posts variable. Are you overwriting it with a WP_Query object?

    phirefly - best to look at the debug log, that will probably help you figure out why Supercache isn't caching.

  6. pixeline
    Posted 3 years ago #

    Hello Donncha,

    Yes indeed, i am. I've exposed the relevant code on pastebin. It fetches the 3 latest posts from a specific post_type, and another one fetches the 5 latest posts in a specific category.
    What would be the recommanded way of doing it, so as not to break WP Super Cache ?
    According to this post, it seemed to me like the right way of doing it.
    Thank you,

  7. pixeline
    Posted 3 years ago #

    OK: changed the $post variable name into something else, no more error. But still, no caching. No comments in the html source code.

  8. pixeline
    Posted 3 years ago #

    I've found something: i'm using cloudflare as a (free) CDN. If i desactivate Cloudflare, caching works!

    But i thought WP Super Cache and Cloudflare were complementary. Am I wrong?

  9. LinkAssist
    Posted 3 years ago #

    @pixeline - just discovered that if your turn off CloudFlare's auto minify, WP Super Cache works again. I also found out that if I turn on mod_rewrite under advanced settings, I lose the WP Super Cache settings pane. For the moment, I'll content myself with using PHP to serve cache files. C'est la vie.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic