Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #94909
    Adam Wolak
    Guest

    W3 Cache The following minifiers cannot be found or are no longer working:

    YUI Compressor (JS): JAVA executable path was not found.

    echo $JAVA_HOME
    /usr/lib/jvm/java-11-openjdk-amd64

    java -version
    openjdk version “11.0.19” 2023-04-18
    OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-0ubuntu120.04.1)
    OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-0ubuntu120.04.1, mixed mode, sharing)

    ls /usr/share/yui-compressor/yui-compressor.jar
    /usr/share/yui-compressor/yui-compressor.jar

    <?php
    namespace W3TCL\Minify;

    // Set the JAVA_HOME environment variable
    putenv(“JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64”);

    // Set the YUI Compressor jar file path and temp directory
    Minify_YUICompressor::$jarFile = ‘/usr/share/java/yui-compressor.jar’;
    Minify_YUICompressor::$tempDir = ‘/var/www/skinclinic/tmp’;

    // Use YUI Compressor to minify the JS code
    $code = Minify_YUICompressor::minifyJs(
    $code,
    array(‘nomunge’ => true, ‘line-break’ => 1000)
    );

    #95078

    Hello Adam,

    Thank you for reaching out and I am happy to assist you with this.
    Can you please share the screenshot of the W3 Total Cache settings in Performance>Minify> JS section and please let me know if you had the YUI Compressor enabled before or have you just selected this option and the issue started to occur?
    Thanks!

    #95085
    Adam Wolak
    Guest

    Hello,
    I just tried to enable it. So, I installed Java and YUICompressor and tried to anable it in W3 Total Cache.
    Can not attach screenshot – so I am writing setting

    JS minify settings: Enable
    Minify method: Combine & Minify
    Minify engine settings:
    Operations in areas:
    Before </head>
    After <body>
    Preserved comment removal (not applied when combine only is active)
    Line break removal (not safe, not applied when combine only is active)
    HTTP/2 push Enable

    #95105

    Hello Adam,

    YOu can upload the images to imgur.com and share the link.
    Thank you for the feedback.
    Can you please also share what you added to the Path to JAVA executable: and Path to JAR file: and what message you are getting when clicking the Test YUI Compressor button?
    Thanks!

    #95248
    Adam Wolak
    Guest

    Hello,
    I am sending you pictures of minify and browser cache.
    Testing yuicompressor never ends.

    View post on imgur.com

    View post on imgur.com

    which java
    /usr/bin/java

    /usr/share/yui-compressor/yui-compressor.jar
    /usr/share/java/yuicompressor.jar – symlink

    echo $JAVA_HOME
    /usr/lib/jvm/java-11-openjdk-amd64

    On browser cache brottli can not be switched on (on server is anabled):
    curl -I -H ‘Accept-Encoding: br’ https://bielskoclinic.pl
    HTTP/2 200
    server: nginx/1.18.0 (Ubuntu)
    date: Tue, 27 Jun 2023 17:13:23 GMT
    content-type: text/html; charset=UTF-8
    vary: Accept-Encoding
    link: <https://bielskoclinic.pl/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    link: <https://bielskoclinic.pl/wp-json/wp/v2/pages/611&gt;; rel=”alternate”; type=”application/json”
    link: <https://bielskoclinic.pl/&gt;; rel=shortlink
    link: </wp-content/cache/minify/d52ed.js>; rel=preload; as=script
    link: </wp-content/cache/minify/3365a.js>; rel=preload; as=script
    link: </wp-content/cache/minify/4c330.js>; rel=preload; as=script
    link: </wp-content/cache/minify/d29e0.js>; rel=preload; as=script
    link: </wp-content/cache/minify/0b78c.js>; rel=preload; as=script
    link: </wp-content/cache/minify/cd429.js>; rel=preload; as=script
    link: </wp-content/cache/minify/864c2.js>; rel=preload; as=script
    link: </wp-content/cache/minify/86b7a.js>; rel=preload; as=script
    link: </wp-content/cache/minify/1615d.js>; rel=preload; as=script
    link: </wp-content/cache/minify/e0c07.js>; rel=preload; as=script
    link: </wp-content/cache/minify/68002.css>; rel=preload; as=style
    link: </wp-content/cache/minify/55947.css>; rel=preload; as=style
    link: </wp-content/cache/minify/677d9.css>; rel=preload; as=style
    link: </wp-content/cache/minify/87ad1.css>; rel=preload; as=style
    last-modified: Tue, 27 Jun 2023 16:40:07 GMT
    expires: Tue, 27 Jun 2023 17:40:07 GMT
    pragma: public
    cache-control: max-age=1604, public
    etag: W/”23d3d2d12d1df0107e91bf84d070bec3″
    x-powered-by: W3 Total Cache/2.3.3
    link: <https://bielskoclinic.pl/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    link: <https://bielskoclinic.pl/wp-json/wp/v2/pages/611&gt;; rel=”alternate”; type=”application/json”
    link: <https://bielskoclinic.pl/&gt;; rel=shortlink
    strict-transport-security: max-age=31536000; includeSubDomains
    content-encoding: br

    #95351
    Adam Wolak
    Guest

    I am sending 2 screenshots – one minify ans second with brotli witch is also not working

    View post on imgur.com

    View post on imgur.com

    Server side:

    which java
    /usr/bin/java

    /usr/share/yui-compressor/yui-compressor.jar
    /usr/share/java/yuicompressor.jar – symlink

    echo $JAVA_HOME
    /usr/lib/jvm/java-11-openjdk-amd64

    Brotli:
    curl -I -H ‘Accept-Encoding: br’ https://bielskoclinic.pl
    HTTP/2 200
    server: nginx/1.18.0 (Ubuntu)
    date: Wed, 28 Jun 2023 11:15:08 GMT
    content-type: text/html; charset=UTF-8
    vary: Accept-Encoding
    link: <https://bielskoclinic.pl/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    link: <https://bielskoclinic.pl/wp-json/wp/v2/pages/611&gt;; rel=”alternate”; type=”application/json”
    link: <https://bielskoclinic.pl/&gt;; rel=shortlink
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=script
    link: <>; rel=preload; as=style
    link: <>; rel=preload; as=style
    link: <>; rel=preload; as=style
    link: <>; rel=preload; as=style
    last-modified: Wed, 28 Jun 2023 11:13:54 GMT
    expires: Wed, 28 Jun 2023 12:13:54 GMT
    pragma: public
    cache-control: max-age=3526, public
    etag: W/”b19af1add1d8fa85e2f75633c5e43e9b”
    x-powered-by: W3 Total Cache/2.3.3
    link: <https://bielskoclinic.pl/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    link: <https://bielskoclinic.pl/wp-json/wp/v2/pages/611&gt;; rel=”alternate”; type=”application/json”
    link: <https://bielskoclinic.pl/&gt;; rel=shortlink
    strict-transport-security: max-age=31536000; includeSubDomains
    content-encoding: br

    #95376

    Hello Adam,

    Thank you for your feedback.
    We need to replicate this and make sure that the paths are correct and the Java is installed correctly
    I’ll get back to you once I have more details and am able to replicate the problem.
    FOr the time being, you should use the default Minify option.
    As for the Brotli, W3 Total Cache only recognizes the PHP extensions so please make sure that the https://github.com/kjdev/php-ext-brotli PHP brotli extension is installed on your server.

    Thanks!

    #95382
    Adam Wolak
    Guest

    https://github.com/kjdev/php-ext-brotli is installed

    #php -modules
    [PHP Modules]
    brotli
    calendar
    Core
    ctype
    curl

    #95644
    Adam Wolak
    Guest

    Hello,
    did you solved problem?
    Adam Wolak

    #95707
    Adam Wolak
    Guest

    Hello,
    I soleved yuicompressor problem. Works fine – google says it is much faster 🙂
    Only Brotli problem remains
    Adam Wolak

    #95722

    Hey Adam,

    Thank you for your feedback.

    It would be great if you could share what the problem was.
    As for Brotli, please run the compatibility check in the W3TC dashboard and share the screenshot.
    Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘YUI Compressor’ is closed to new replies.