Support » Plugin: Merge + Minify + Refresh » Does not minify

  • Resolved SpabRice

    (@spabrice)


    Hello,

    Unfortuantely it is not minifying the js files. Merging works fine but they are not minified (Some files yes, other files don’t). Am I missing something?

    • This topic was modified 3 months, 1 week ago by SpabRice.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author launchinteractive

    (@launchinteractive)

    Minification is done using WordPress cron. Do you have that turned off?
    Also, check the settings page and expand the javascript items. It will say if it had issues minifying files.

    Hello,

    yes, the CRON is turned ON, but still not working 🙁

    Furthermore, how can I strip the jquery.js?ver=1.12.4-wp file from being merged/processed?

    • This reply was modified 3 months, 1 week ago by SpabRice.
    Plugin Author launchinteractive

    (@launchinteractive)

    On the MMR Settings page can you click on each merge and see if any errors are listed?

    To ignore the jquery file get the full path from the merge list and add it to the ignore box on the settings page.

    SpabRice

    (@spabrice)

    Hello,

    there are no issues in the LOG. See here:

    2020-07-17T07:00:51+00:00 - MERGED:
     - visible - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.visible.min.js
     - unveil - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.unveil.min.js
     - easing - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.easing.min.js
     - tweenmax - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/tweenMax.js
     - isotope - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.isotope.min.js
     - fitvids - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.fitvids.min.js
     - lightcase - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.lightcase.min.js
     - flickity - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.flickity.js
     - phatvideo - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.min.phatvideobg.js
     - bgparallax - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/jquery.backgroundparallax.min.js
     - vavo-script - http://spab-rice.com/wordpress/vavo/demo/wp-content/themes/vavo/files/js/script.js
     - contact-form-7 - http://spab-rice.com/wordpress/vavo/demo/wp-content/plugins/contact-form-7/includes/js/scripts.js
     - wp-embed - /wp-includes/js/wp-embed.min.js - unminified version used
    2020-07-17T07:00:53+00:00 - COMPRESSING WITH MINIFY (PHP exec not available or java not found)
    2020-07-17T07:00:53+00:00 - COMPRESSION COMPLETE - 63.65K save

    Although it says that for example the second file unveil.min.js has been minified, it is not the case.
    See here:
    view-source:http://spab-rice.com/wordpress/vavo/demo/wp-content/mmr/a4173c25-1586779731.js

    What could this be?

    • This reply was modified 3 months ago by SpabRice.
    Plugin Author launchinteractive

    (@launchinteractive)

    Ahh, its because the files you are including have .min.js in their file extension. MMR assumes the files are already minified when the extension is .min.js or .min.css.

    Can you rename your files?

    SpabRice

    (@spabrice)

    Hello,

    thanks for your fast response.
    Yes, I guessed this too, but the flickity.js & script.js file has no .min in their file extensions and they are not minifying.
    I renamed the filenames on one of my testing site and it did not make any impact.

    Edit: It does work fine for all css files though.

    • This reply was modified 3 months ago by SpabRice.
    • This reply was modified 3 months ago by SpabRice.
    Plugin Author launchinteractive

    (@launchinteractive)

    After reviewing the MMR code it looks like MMR will minify files every time if there are more than 1 file to merge.

    It looks like flickity.js and script.js have minified ok. Are you waiting for the background cron to complete before reviewing the files?

    It doesn’t look like jquery.unveil.min.js has minified which I find interesting. I wonder if it’s an encoding issue. Are you able to check if those files are saved as UTF-8?

    Plugin Author launchinteractive

    (@launchinteractive)

    After looking at this again I believe the issue relates to PHP Minify having trouble minifying javascript that is already minified. I suggest enqueing the unminified version of your javascript as that should solve the issue.

    I now tried many things, but it never minify my js files.
    If I enqueue the unminified version, it does not minify. Like in the example with the script.js file which is an unminified version. How can I get them minified? This is dropping my speedtest.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.