Title: [Plugin: Asynchronous Widgets] Does not work with Widget Cache
Last modified: August 20, 2016

---

# [Plugin: Asynchronous Widgets] Does not work with Widget Cache

 *  [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/)
 * Great idea, but this doesn’t seem to work with Widget Cache (and perhaps Super
   Cache, who knows):
 * `PHP Fatal error: call_user_func_array(): The script tried to execute a method
   or access a property of an incomplete object. Please ensure that the class definition"
   WidgetCache" of the object you are trying to operate on was loaded _before_ unserialize()
   gets called or provide a __autoload() function to load the class definition in/
   PATH/wp-content/plugins/asynchronous-widgets/async-widgets.php on line 312`
 * Also some cosmetic details that are highly annoying: inline javascript, `<center
   >` markup tags and a bulky `<noscript>` message that may not be in accordance
   with the language used on the blog…
 * [http://wordpress.org/extend/plugins/asynchronous-widgets/](http://wordpress.org/extend/plugins/asynchronous-widgets/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661733)
 * Actually it is not Widget Cache, it is something else. Maybe it doesn’t work 
   with MO Cache and APC Object Cache Backend, given that it complains about objects.
 *  Plugin Author [da.futt](https://wordpress.org/support/users/dafutt/)
 * (@dafutt)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661750)
 * Hi liangzai,
 * Thanks for your feedback.
 * You are right: it’s not Widget Cache that causes the problem you describe, but
   rather Super Cache. I’ve updated the code and I think I’ve got it to work now.
   Would you mind grabbing the development version (trunk) and trying it out?
    I
   haven’t tried the other caches you’re talking about, though.
 * You’re also perfectly right about the inline JavaScript. I’ve moved that to a
   separate file.
 * As for the <noscript /> stuff, how wouldyou propose this should be handled?
 * df.
 *  Thread Starter [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661753)
 * Nope, sorry, no go; still the same error.
 *  Plugin Author [da.futt](https://wordpress.org/support/users/dafutt/)
 * (@dafutt)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661757)
 * Even if you fully clear the cache? I’ve had the same problem.
 * The thing is that this plugin stores the widget’s parameters whenthe page is 
   loaded, and restores them it the AJAX call.
 * Since with the Super Cache plugin, the widget is not loaded, and hence the plugin’s
   hook not executed, we can’t store the values, and then the AJAX call fails.
    
   To alleviate this, the code checks whether the Super Cache plugin is enabled,
   and if so, stores the widget paramaters directly to the database (and gets them
   from there in the AJAX call). But for that to work, it has to go through the “
   normal” loop at least once — before Super Cacha has a chance to do its magic.
 *  Thread Starter [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661759)
 * Super Cache doesn’t do any caching for me as admin. It just gives a 500 error
   and leaves a gap on the page where the widget were supposed to be.
 * I’ll give it another shot at a less busy hour, with cleared super-cache and also
   cleared APC cache (apache restart)… APC can do nasty things like this.
 *  Plugin Author [da.futt](https://wordpress.org/support/users/dafutt/)
 * (@dafutt)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661760)
 * Okay. Thanks.
 *  Thread Starter [Inposure](https://wordpress.org/support/users/liangzai/)
 * (@liangzai)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661763)
 * I experimented on my local install. APC Object Cache Backend is definitely a 
   culprit.
 * [http://wordpress.org/extend/plugins/apc/](http://wordpress.org/extend/plugins/apc/)
 * (It is needed for MO Cache, which in turn is needed to speed up translation of.
   mo files)
 *  Plugin Author [da.futt](https://wordpress.org/support/users/dafutt/)
 * (@dafutt)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661770)
 * APC look tricky. Might take me some time.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: Asynchronous Widgets] Does not work with Widget Cache’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/asynchronous-widgets.svg)
 * [Asynchronous Widgets](https://wordpress.org/plugins/asynchronous-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/asynchronous-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/asynchronous-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/asynchronous-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/asynchronous-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/asynchronous-widgets/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [da.futt](https://wordpress.org/support/users/dafutt/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-asynchronous-widgets-does-not-work-with-widget-cache/#post-2661770)
 * Status: not resolved