WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
Problems enabling the javascript and CSS options (8 posts)

  1. sandy78
    Member
    Posted 1 year ago #

    I have installed for first time autoptimize plugin and after activate it, I enabled the 3 options one by one, to see if there were any troubleshooting with any of them:

    -Option html- no problem. Everything looks ok.

    -Option CSS- Very big problem because after anable this option my webside doesn't load. Just appear on the top of the screen this message:

    Fatal error: Cannot redeclare class Minify_CSS_Compressor in /home4/ftworld/public_html/sala-fw/wp-content/themes/website/drone/ext/minify/css.php on line 21

    So, I tried the option: "Look for scripts only in head?" but the same consecuences, white screen with same message.

    -Option javascript: My website loads but some things doesn't load properly: the slideshows created with the plugin NextGen Gallery, the facebook box widget (included in my theme) don't load, the featured image in the posts in the homepage is empty, doesn't load, and some other images with link in homepage doesn't load. And the facebook, twitter and google+ like butons that are at the end of every post doesn't load neither.
    I tried the option: "Look for scripts only in head?" but same consecuences.

    So there are anything that could I do?
    Now I only have enabled the html option

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

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Sandy;
    Based on the error message ("Fatal error: Cannot redeclare class Minify_CSS_Compressor in /home4/ftworld/public_html/sala-fw/wp-content/themes/website/drone/ext/minify/css.php on line 21") you have a theme that tries to do CSS minification itself. That means you'll have to choose to use that one, or (if you can disable CSS minimization in your theme) Autoptimize's CSS minification.

    As far as javascript is concerned; you'll have to exclude certain scripts from being Autoptimized. To do that you'll have to dive in the HTML, checking which javascript is loaded and in the JavaScript error console to see which scripts are complaining and play around with the exclude options until it works.

    Hope this helps,
    frank

  3. sandy78
    Member
    Posted 1 year ago #

    Thanks for you quick answer.

    About javascript option, I no have idea about HTML, so I will try to contact with the theme developer and with the nextgen plugin developer, maybe they can help me

  4. futtta
    Member
    Plugin Author

    Posted 11 months ago #

    for javascript; I just released a new version which has an 'force javascript in head' option. it could help solve some (jQuery-related) javascript problems.

  5. sandy78
    Member
    Posted 11 months ago #

    I've tried the new version; I've enabled the javascript optimization and the "force javascript in head" but the slideshow of my theme doesn't work properly, the images of the slideshow loads distorted.

    I only can enable the html optimization.

  6. futtta
    Member
    Plugin Author

    Posted 11 months ago #

    Did you try with "search in head" and "force in head" combined? That might work, as a last resort?

  7. sandy78
    Member
    Posted 11 months ago #

    Yes, I tried, but it doesn't work, same issue with the slideshow images

  8. futtta
    Member
    Plugin Author

    Posted 11 months ago #

    In that case I'm afraid you'll have to resort to excluding specific scripts from being Autoptimized.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.