Forums

[Plugin: W3 Total Cache] Unable to minify CSS or JS (26 posts)

  1. wichtounet
    Member
    Posted 2 years ago #

    Hi,

    I just installed W3 Total Cache and the main features works fine.

    But now, i want to try minify CSS and JS, but i found no way to make that works for me.

    When i activate CSS Minify and add the CSS :
    wp-content/themes/f2/style.css
    to the list.

    The site appears with no CSS at all.

    The source page contains a CSS like that :
    http://www.baptiste-wicht.com/wp-content/w3tc/min/index.php?gg=default&g=include&t=css

    But if try to access it, i have the following messages :

    This file cannot be accessed directly

    The wp-content/w3tc/min directory is empty. But it's write-able with 777 (i try other, but nothing works).

    I also try enabling/disabling the URL rewrite structure, but nothing changes at all.

    Does someone have an idea on how to solve this problem ?

    Thanks a lot.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. wichtounet
    Member
    Posted 2 years ago #

    The URL was not correct (i don't know why ?).

    Now, if i try the correct URL : http://www.baptiste-wicht.com/wp-content/w3tc/min/index.php?gg=default&g=include&t=css

    I got a

    HTTP/1.0 400 Bad Request

    And i've some logs like that :

    "/kunden/homepages/27/d320312359/htdocs/homepages/27/d320312359/htdocs/wp-content/themes/f2/style.css" could not be found (or was not a file)
    [Sun, 18 Apr 2010 14:26:56 +0000] [/wp-content/w3tc/min/index.php?gg=default&g=include&t=css] The path "/kunden/homepages/27/d320312359/htdocs/homepages/27/d320312359/htdocs/wp-content/themes/f2/style.css" could not be found (or was not a file)

    Seems that the name of the server is added twice, no ?

    Hope that helps to solve the problems

  3. wichtounet
    Member
    Posted 2 years ago #

    I just try the development version.

    It's a little better.

    The CSS files are good combined but not minified. And if a check to "Rewrite URL structure", there is no combine and no minify.

    "Combine only" is not setted.

    The "Comment removal" works well.

  4. Frederick Townes
    Member
    Posted 2 years ago #

    I can't comment because I'm not sure what your settings are, nor what CSS files you're minifying. At this point submitting a bug submission would be most useful so I can see your specific details.

  5. wichtounet
    Member
    Posted 2 years ago #

    Ok, I'll submit a bug report tonight.

    One other information i found : JS combine is good (no minify) but the links are not removed from the page source.

  6. wichtounet
    Member
    Posted 2 years ago #

    Error :(

  7. wichtounet
    Member
    Posted 2 years ago #

    Apparently, there is also errors with the JS Combination.

    The JS are apparently combined, but they are not recognized in the source page, so there they cannot be used from the page.

  8. wichtounet
    Member
    Posted 2 years ago #

    Nobody has an idea ?

    Or an other plugin that made the same things as W3 ?

  9. jmorrow
    Member
    Posted 2 years ago #

    Yeah, don't worry.

    You can't minify all JS/CSS. some just don't work. When I switched to Hybrid framework, I found that most of my CSS/JS won't minify without causing problems.

    The only solution is to try adding each file individually and see if it causes problems. Leave out the JS/CSS that causes problems.

    If you use Firefox/Firebug, and you see a question mark at the end of the JS, then you know it won't minify.

    Anyway, I've had similar problems and it didn't resolve from switching software (WP minify, WP Super Cache, WP total Cache)--it doesn't matter, so it's not a software issue.

    If you're really set on minifying your CSS/JS, you'd have better luck to try changing themes.

  10. Frederick Townes
    Member
    Posted 2 years ago #

    Jmorrow is correct. More minification engines will be added to future releases to make the success rate of minfication higher, for now only the default functionality of the open source minify project is used.

  11. godkid
    Member
    Posted 2 years ago #

    I just installed this and checked stuff using the firebug NET panel. What seems to be happening is that (as noted) the results of the minification is not being returned so I get a 400 Bad Request error as soon as I add ANY file to either of the lists under minify.

    I used to use WPMinify which I believe uses the same minification engine without a problem, so I don't think the minification engine is the problem - the file default.include.css or .js simply isn't being found/written (IMO). Not certain if it's a server thing.

    My setup:
    Wp - 2.9.2
    WtC - latest from WP plugin site
    Hosting - shared (GoDaddy)

    Any ideas are welcome

  12. godkid
    Member
    Posted 2 years ago #

    sorry - forgot the link to the screenie -> http://www.dropbox.com/gallery/5176384/1/WTC%20Screenies?h=a4cf2b

  13. wichtounet
    Member
    Posted 2 years ago #

    Ok, perhaps my JS scripts cannot be minified, no problem. But normally all JS can be combined, no ?

  14. Frederick Townes
    Member
    Posted 2 years ago #

    Sorry no, that's not even true.

  15. godkid
    Member
    Posted 2 years ago #

    @fredericktownes - any ideas why the file isn't being written to the folder in my case?

  16. Frederick Townes
    Member
    Posted 2 years ago #

    Are there any errors in your error log?

  17. godkid
    Member
    Posted 2 years ago #

    @fredericktownes

    ...seems to be the same issue (in some way) as the one reported here: http://wordpress.org/support/topic/350103?replies=25

    error log reports that the css file could not be found on my server - but the path to the file seems wrong ->

    [/wp-content/w3tc/min/default.include.css] The path "/var/chroot/home/***/home/***/wp-content/themes/redlight/style.css" could not be found (or was not a file)

    - which is entirely true - as the path to my file SHOULD be: home/***/wp-content/themes/redlight/style.css

    ...matter of fact - if you look at the initial error logs posted by the creator of both threads, you'll see that the "doubling up" of the address in the absolute path to the WP install directory has been the problem in all cases.

  18. Frederick Townes
    Member
    Posted 2 years ago #

    Do not put the server path in minify settings. Please check out the faq, the file you specified should have the following path in the settings: wp-content/themes/redlight/style.css

  19. godkid
    Member
    Posted 2 years ago #

    @fredericktownes

    Sorry - I may have caused some confusion:

    1. As a practice I enter the full web path (http://www.mydomain.com/...) for those with the version identifier OR just the path (as you suggest) for those without. As I've noted - I tried reinstalling to no avail.

    2. The error I've identified above occurs despite putting the address in as instructed. The error is that the plugin generates that "doubling" in the absolute path - I was simply pointing to the error versus the correct address. It's the same error that the others have mentioned - if you take a look at the error log you see the same doubling in the absolute path to the file.

  20. Frederick Townes
    Member
    Posted 2 years ago #

  21. godkid
    Member
    Posted 2 years ago #

    @fredericktownes

    Thanks alot! The development version works like a charm - I'll keep it enabled till an update is posted to WP plugin site.

    I assume the update notification will be displayed similarly as if I were running a normal version of the plugin.

  22. wichtounet
    Member
    Posted 2 years ago #

    I tried the last development version and it's a lot better :)

    The JS/CSS minify and combine works well :)

    The only things that doesn't work is the Rewrite URL Structure for minify, but that's really not important.

    Thanks a lot for your work.

  23. Frederick Townes
    Member
    Posted 2 years ago #

    Can I debug that issue on your server? Please submit a bug submission report from the support tab of the plugin?

  24. DanMichel
    Member
    Posted 1 year ago #

    used your contact form on your site to contact you

  25. Frederick Townes
    Member
    Posted 1 year ago #

    @DanMichel, Was this issue already handled?

  26. shamasis
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic