WordPress.org

Ready to get started?Download WordPress

Forums

Asynchronous Widgets
Does not work with Widget Cache (9 posts)

  1. Inposure
    Member
    Posted 2 years ago #

    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/

  2. Inposure
    Member
    Posted 2 years ago #

    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.

  3. da.futt
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  4. Inposure
    Member
    Posted 2 years ago #

    Nope, sorry, no go; still the same error.

  5. da.futt
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  6. Inposure
    Member
    Posted 2 years ago #

    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.

  7. da.futt
    Member
    Plugin Author

    Posted 2 years ago #

    Okay. Thanks.

  8. Inposure
    Member
    Posted 2 years ago #

    I experimented on my local install. APC Object Cache Backend is definitely a culprit.

    http://wordpress.org/extend/plugins/apc/

    (It is needed for MO Cache, which in turn is needed to speed up translation of .mo files)

  9. da.futt
    Member
    Plugin Author

    Posted 2 years ago #

    APC look tricky. Might take me some time.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic