Title: Problems enabling the javascript and CSS options
Last modified: August 21, 2016

---

# Problems enabling the javascript and CSS options

 *  [sandy78](https://wordpress.org/support/users/sandy78/)
 * (@sandy78)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/)
 * 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/](http://wordpress.org/plugins/autoptimize/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956521)
 * 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
 *  Thread Starter [sandy78](https://wordpress.org/support/users/sandy78/)
 * (@sandy78)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956525)
 * 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
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956701)
 * 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.
 *  Thread Starter [sandy78](https://wordpress.org/support/users/sandy78/)
 * (@sandy78)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956702)
 * 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.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956703)
 * Did you try with “search in head” and “force in head” combined? That might work,
   as a last resort?
 *  Thread Starter [sandy78](https://wordpress.org/support/users/sandy78/)
 * (@sandy78)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956704)
 * Yes, I tried, but it doesn’t work, same issue with the slideshow images
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956711)
 * In that case I’m afraid you’ll have to resort to excluding specific scripts from
   being Autoptimized.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Problems enabling the javascript and CSS options’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/problems-enabling-the-javascript-and-css-options/#post-3956711)
 * Status: not resolved