• Resolved aaanadie

    (@aaanadie)


    This plugin was working perfect (1.5.1) but when updated to 1.6.0 my site shows bad, 1.6.1 have same problem, uninstalled and reinstalled 1.5.1 fixed all, updated to 1.6.1 again (to be sure) but still problems so put 1.5.1 again.
    If I just disable 1.6.0 or 1.6.1 my site shows ok, but PageSpeed goes low (PageSpeed=91, YSlow=98 with 1.5.1).
    No other change to the site else disable/enable this plugin.

    I apologize for my bad English.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Frank Goossens

    (@futtta)

    thanks for your feedback aaanadie.

    some questions;

    1. did you clear the autoptimize cache (all files in wp-content/cache/autoptimize/) before trying 1.6.1 (to avoid seeing the corrupt 1.6.0 output)?
    2. do you know if the problem was with CSS or JS or both (toggling options in admin-page)?
    3. do you have a (development or test-)site where I could see the problem?
    4. what is the URL to your live site (if you don’t want that to be public, you can mail me at futtta-at-gmail-dot-com)?
    Thread Starter aaanadie

    (@aaanadie)

    – Yes, cache cleared (in Autoptimize, Supercache & Cloudflare, several times).
    – Tried disable/enable every option & cleared caches.
    – Site URL:
    1energy1.com

    Plugin Author Frank Goossens

    (@futtta)

    I suspect the problem is with the new version of the getpath-function in wp-content/plugins/autoptimize/classes/autoptimizeBase.php. Could you open that and replace the protected function getpath($url) with this piece of (1.5.1) code?


    protected function getpath($url)
    {
    $path = str_replace(get_settings('home'),'',$url);
    if(preg_match('#^(https?|ftp)://#i',$path))
    {
    //External script (adsense, etc)
    return false;
    }
    $path = str_replace('//','/',ABSPATH.$path);
    return $path;
    }

    If this indeed fixes things, I’ll create 1.6.2 to revert back to the 1.5.1 getpath-function.

    Looking forward to your feedback!

    Thread Starter aaanadie

    (@aaanadie)

    Didn’t work. I updated to 1.6.1, then copied/pasted getpath function, then cleared caches, same result.
    This is the new “wp-content/plugins/autoptimize/classes/autoptimizeBase.php” (1.6.1):

    *******
    <?php

    abstract class autoptimizeBase
    {
    protected $content = ”;

    public function __construct($content)
    {
    $this->content = $content;
    //Best place to catch errors
    }

    //Reads the page and collects tags
    abstract public function read($justhead);

    //Joins and optimizes collected things
    abstract public function minify();

    //Caches the things
    abstract public function cache();

    //Returns the content
    abstract public function getcontent();

    //Converts an URL to a full path
    protected function getpath($url)
    {
    $path = str_replace(get_settings(‘home’),”,$url);
    if(preg_match(‘#^(https?|ftp)://#i’,$path))
    {
    //External script (adsense, etc)
    return false;
    }
    $path = str_replace(‘//’,’/’,ABSPATH.$path);
    return $path;
    }

    // coz I’m a crappy developer and I need easy access to whatever I want to log
    protected function ao_logger($logmsg) {
    $logfile=WP_CONTENT_DIR.’/ao_log.txt’;
    $logmsg.=”\n”;
    file_put_contents($logfile,$logmsg,FILE_APPEND);
    }
    }

    Plugin Author Frank Goossens

    (@futtta)

    Hmm, still looking into this. Another user said JS-optimization still worked, only CSS-optimization was broken. Can you check/ confirm with CSS-optimization disabled and JS-optimization enabled?

    Plugin Author Frank Goossens

    (@futtta)

    additional question: are you on a WordPress multi-site setup aaanadie?

    Thread Starter aaanadie

    (@aaanadie)

    Yes, I have Word Press multisite 3.5.1, but I enabled this plugin only for the main site.

    Plugin Author Frank Goossens

    (@futtta)

    OK. Can you also check with CSS-optimization disabled and JS-optimization enabled? Based on info from another user, that could work.

    Plugin Author Frank Goossens

    (@futtta)

    And what webserver are you running, Apache or something else?

    Plugin Author Frank Goossens

    (@futtta)

    Update: of the 4 people I’ve been mailing with who had issues with the update, at least 2 were not running on an Apache server.

    In config/delayed.php however I thoughtlessly used a PHP-function which is only available in Apache (apache_request_headers), so that indeed had to break on e.g. Lighttpd, Ngnix and MS IIS.

    If you indeed aren’t on Apache either, I pushed out a new version, 1.6.2, which could (should, but I’m being very careful here) solve your Autoptimizing problems as well!

    Thread Starter aaanadie

    (@aaanadie)

    Disabling CSS-optimization works, but gets low PageSpeed & YSlow than old version.

    Server:
    Apache version 2.2.23
    PHP version 5.2.17
    MySQL version 5.5.30-cll
    Architecture x86_64
    Operating system linux
    Perl version 5.8.8
    Kernel version 2.6.18-408.8.2

    Thread Starter aaanadie

    (@aaanadie)

    Working Perfect Everything for 1.6.2 !!!
    Updated to 1.6.2, then enabled again CSS-optimization, cleared all caches, checked everything several times, no errors found and PageSeed=92, YSlow=98.
    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Not working 1.6.0 and 1.6.1 (for me)’ is closed to new replies.