Support » Plugin: Autoptimize » Autoptimize: problems & how to solve them

  • Plugin Author Frank Goossens

    (@futtta)


    • If you are running into problems with Autoptimize, I’d recommend you go through the FAQ and specifically the “troubleshooting”-part.
    • If your theme (or a plugin) uses jQuery and you want to be sure everything continues to work, I’d recommend to activate the “force javascript in head” option (as older versions of Internet Explorer have issues with deferred jQuery).
    • If you’re encountering horrible problems with CSS and/ or JS minification (e.g. white pages), these could be due to the newer CSS/ JS compression components. If that is the case, you can easily switch back to older minification components, by adding this to your wp-config.php;
      define("AUTOPTIMIZE_LEGACY_MINIFIERS","true");

      The “legacy minifiers” will remain in Autoptimize “for ever” and changes to wp-config.php are not affected by core-, theme- or plugin-upgrades so you should be good to go.

Viewing 15 replies - 1 through 15 (of 38 total)
  • Hello, there is a problem when running together, WP Boxer byMark Boomaars, autoptimize get completely inactive when WP Boxer is turned on.

    Plugin Author Frank Goossens

    (@futtta)

    I replied in your other topic danka.

    Plugin Author Frank Goossens

    (@futtta)

    Intermediate result;

    Problem is with the actual minification (the external CSS minifier being called) of 2014’s style.css.

    For reasons I don’t understand that crashes Apache with error:

    [Tue Dec 31 16:34:24.854624 2013] [mpm_winnt:notice] [pid 1776:tid 204] AH00428: Parent: child process 1840 exited with status 3221225477 — Restarting.

    We’re not the first to encounter such issues, as witnessed by this search query. I’m browsing through the results, but this is a vast uncharted territory for me. But who knows what I’ll learn … πŸ˜‰

    Plugin Author Frank Goossens

    (@futtta)

    Update; problem can be reproduced with the GUI that comes with YUI CSS compressor PHP port and twentyfourteen style.css contents, no matter what options selected.

    Plugin Author Frank Goossens

    (@futtta)

    Update part xyz; similar (if not identical) bugreports were already posted (1) and (2).

    The developer’s opinion, backed by multiple reports of others facing this issue, is that this is due to a problem with the Apache/ PHP-installation on Windows (certain libraries not being loaded as they’re not, leading to Apache crashes).

    I tend to agree, but would love to be able to fix this at least on my own machine (by copying files from xampp/php to whatever directory anyone sees fit). That, I have not been able to do yet … :-/

    Hi, we are faced to some terrible CSS failure after the installation of Autoptimize and there’s no way to solve it! Even after plugin deactivation and removal the problem is still there, how can it ever touch the original CSS files?? The whole site, even at the backoffice, just loses any styling format!

    Plugin Author Frank Goossens

    (@futtta)

    Sorry to hear that inputcreativity, but I’m afraid I don’t see how Autoptimize could cause these kinds of problems, as;
    * it never changes the original CSS (or JS) of the frontend
    *Β¨it never impacts the backend CSS (or JS) in any way

    Once you remove Autoptimize (and clean any caching plugin’s cache, although AO tries to do that upon uninstallation) all should be as before. There must be something else messing things up.

    We deactivated any other plugins, also removed everything at the cache directory that Autoptimize uses. There’s no any other caching or minifying plugin, so the only explanation is that Autoptimize does something wrong.. could it have any incompatibility with Klasik framework?

    This is how we see the back-office, with WP 3.8 it should be black:
    http://i43.tinypic.com/345y7nl.jpg

    And this is what happens to the admin bar at front-office, it loses the format absolutely:
    http://i41.tinypic.com/21jdkyx.jpg

    The deal is than when we deactivate and remove the plugin completely (including the cache) the whole site loses any styling – no style at all! I don’t really think that something else could destroy the styling, as we only have this plugins: Autoptimize, Better WP Security, Contact Form 7, Content Aware Sidebars, Simple Social Icons, WordPress SEO, WP-PageNavi, WP Mailto Links and WP Smush.it.

    Our site is semi-functional on front-office only when we activate Autoptimize with HTML and CSS compression options, as I said before, without this we just don’t have any style applied!

    Plugin Author Frank Goossens

    (@futtta)

    A brief explanation of how AO works;
    * it catches the full html from the output buffer (hooked to action template_redirect)
    * it searches all CSS, aggregates & minimizes & stores it in cache/autoptimize/autoptimize_hash.css (or similar)
    * it searches all JS, aggregates & minimizes & stores it in cache/autoptimize/autoptimize_hash.js (or similar)
    * it removes the old references to CSS/ JS in the HTML and replaces it with the new ones

    So if you remove autoptimize & the cache, autoptimize cannot do anything, as it does not act on admin (template_redirect is for frontend) and as it stores it’s own files in cache/autoptimize.

    Based on what I see on your site (screenshots give away stuff πŸ˜‰ ), there are some files (e.g. /wp-admin/css/wp-admin.min.css) which are empty. If they are empty on the server filesystem as well, I would unzip WordPress over the installation again. If that file is not empty, there might be a problem of some kind in your .htaccess?

    I also see you have renamed “wp-content” in “contentidos”, that might have thrown off Autoptimize when it was running in the first place.

    Muhammad Waqas Baig

    (@muhammad-waqas-baig)

    Hi, I get a 500 Internal Server Error whenever I enable “Optimize CSS Code” on my website “pakfocus.com”. I heard that this plugin was good but don’t from where this problem is coming from. Can you fix this futtta??

    Plugin Author Frank Goossens

    (@futtta)

    Hi Muhammad;
    There’s a number of things you could do;

    • add

      define(“AUTOPTIMIZE_LEGACY_MINIFIERS”,”true”);

      to your /wp-config.php and see if that solves this issue, remove it if it doesn’t

    • download the test-version of 1.8.0 here and install it to see if that solves the problem (lots of improvements in error-handling there)
    • create a small list of all css (filename or if inline a unique string) and then optimize CSS excluding one file/ inline block at a time (if you do find the culprit, I’ll be interested in hearing about that, maybe I can use that info to improve)

    Hope this helps,
    frank

    Muhammad Waqas Baig

    (@muhammad-waqas-baig)

    Hi Frank, first of all thank you very much for immediate reply. To tell you truth, I am not good at php and I ll need your help to add the code you suggested. Can you guide me where exactly I should place that. I am using Tribune theme from WPZoom.
    I have also tried 1.8 version but same result.

    Plugin Author Frank Goossens

    (@futtta)

    Well, the good news is that the excluding is not in PHP, but in the Autoptimize admin-page.

    But what might be a better approach; if you send me the theme’s zip-file (futtta at gmail dot com) I’ll install on my test-blog and see if I can reproduce and fix the bug there?

    Muhammad Waqas Baig

    (@muhammad-waqas-baig)

    Great! I entered that code in Autoptimize and that error did not appear and remarkable increase in speed performance πŸ™‚ . However, one problem solved and another appears. Now my website is not showing proper appearance, rather, it shows a very simple and odd look. Please guide
    Best Regards

    Muhammad Waqas Baig

    (@muhammad-waqas-baig)

    both desktop and mobile theme has this issue “pakfocus.com”

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘Autoptimize: problems & how to solve them’ is closed to new replies.