WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
Autoptimize: problems & how to solve them (34 posts)

  1. Frank Goossens
    Member
    Plugin Author

    Posted 8 months ago #

    • 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.

  2. danka
    Member
    Posted 7 months ago #

    Hello, there is a problem when running together, WP Boxer byMark Boomaars, autoptimize get completely inactive when WP Boxer is turned on.

  3. Frank Goossens
    Member
    Plugin Author

    Posted 7 months ago #

    I replied in your other topic danka.

  4. Frank Goossens
    Member
    Plugin Author

    Posted 7 months ago #

    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 ... ;-)

  5. Frank Goossens
    Member
    Plugin Author

    Posted 7 months ago #

    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.

  6. Frank Goossens
    Member
    Plugin Author

    Posted 7 months ago #

    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 ... :-/

  7. inputcreativity
    Member
    Posted 6 months ago #

    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!

  8. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    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.

  9. inputcreativity
    Member
    Posted 6 months ago #

    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!

  10. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    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.

  11. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    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??

  12. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    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

  13. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    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.

  14. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    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?

  15. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    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

  16. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    both desktop and mobile theme has this issue "pakfocus.com"

  17. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    OK, but what code did you enter in the exclude CSS field?

  18. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    I see you have "defer CSS" active, I would not do that (yet, at least). First get it working with normal settings.

  19. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    This code as you suggested
    define("AUTOPTIMIZE_LEGACY_MINIFIERS","true");

  20. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    OK. Can you now disable "defer CSS" for now?

  21. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    Yup dear I did but issue remains the same. And devil comes back again of 500 internal server error, i see when I save after adding the code, it disappears from the box. last thing I can do is to go without enabling optimize css.

  22. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    weird. you could still try to exclude CSS-files from being autoptimized? Otherwise I'd love to debug this on my server, if you could send me the theme zipfile?

  23. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    As a matter of fact, I borrowed this theme from my friend and he has that zip file. I will ask him to provide it to me then I will pass it to you. Meanwhile, I have unchecked the optimize css option because still html and java script optimizations are useful for me. It would be even great if I could get benefit from css optimization.
    Thank you again for your prompt responses.

  24. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    OK, I'll keep an eye on my mailbox.

    frank

  25. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    Muhammad; could you try CSS optimization with "all-in-one-buttons/css/display.css" in the exclusion field?

  26. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    I have just un-installed that plugin and now m going to check that option again

  27. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    I mean un-installed all in one buttons plugin

  28. Frank Goossens
    Member
    Plugin Author

    Posted 6 months ago #

    I installed "all in one buttons" on one of my testblogs and it indeed crashed the CSS minification library. When testing in the CSS minification lib, the same problem occurs, so I'll file a bug report there.

  29. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    wao, much much better I have got goggle speed insights 79/100 for mobile. It was around 48/100 without Autoptimize and remarkable betterment in Desktop mode also. I have sacrificed "All in one Buttons" because I think that was creating problems and I am rewarded. Hats off for Futta...!

  30. Muhammad Waqas Baig
    Member
    Posted 6 months ago #

    Man you deserve 5+ stars. Clapping for Futtta...!

Reply »

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.