• Resolved thpani

    (@thpani)


    On all my WordPress installations, setting the enable_ads_network (“Enable UAN”) option to No doesn’t work.

    I’ve hunted it down to this snippet in admin/wp-slimstat-admin.php:


    // Update the table structure and options, if needed
    if (!isset(wp_slimstat::$options['version']) || wp_slimstat::$options['version'] != wp_slimstat::$version){
    self::update_tables_and_options(false);
    }
    else{
    $filemtime = @filemtime(WP_PLUGIN_DIR.'/wp-slimstat/admin/wp-slimstat-admin.php');
    if ($filemtime < date('U') - 864000){
    self::update_option('enable_ads_network', 'yes', 'yesno');
    }
    }

    though I don’t really understand what your testing the mtime for…

    BTW, the Azure (?) endpoint at wordpress.cloudapp.net is lagging as hell. That’s why I’m trying to disable this in the first place.

    http://wordpress.org/plugins/wp-slimstat/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jason Crouse

    (@coolmann)

    Hi there,

    it is a bug in the code, we have already fixed it in version 3.4.2 😉 The request, however, has a timeout of 1 second (see code), so even if the endpoint is slow, it shouldn’t really affect your site. I will take a look at the issue and see if there’s anything I can do to further optimize it.

    Thank you for pointing it out!
    Camu

    Thread Starter thpani

    (@thpani)

    Hi,

    thanks for the quick response.
    I just noticed the timeout being set, but I definitely have blocking requests. Perhaps there’s a bug in WP_Http, I’ll let you know.

    Thomas

    Plugin Author Jason Crouse

    (@coolmann)

    Yes, that’s what I wanted to test as well. If you find out any useful information, I’d be happy to edit my code to implement the workaround.

    Camu

    Plugin Author Jason Crouse

    (@coolmann)

    I see the timeout value is passed to an apply_filter. Maybe you have another plugin that changes that value back to a bigger one?

    Thread Starter thpani

    (@thpani)

    Found the problem, the streams transport in WP_Http doesn’t correctly handle timeouts: http://core.trac.wordpress.org/ticket/13841

    If the API is frequently congested, maybe you can test for Wp_Http_Curl or something… it’s a shame such bugs stay unfixed for 3 years…

    Plugin Author Jason Crouse

    (@coolmann)

    Oh wow, good catch! I will make sure to implement a workaround for this issue. You’re right, it’s a shame that they don’t really care about this kind of things…

    Plugin Author Jason Crouse

    (@coolmann)

    We’ve optimized our servers for now. Hopefully the bug will be addressed sooner or later.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘enable_ads_network option reset’ is closed to new replies.