Does not minify
-
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 5 years, 8 months ago by
SpabRice.
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.
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 saveAlthough 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.jsWhat could this be?
-
This reply was modified 5 years, 8 months ago by
SpabRice.
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?
-
This reply was modified 5 years, 8 months ago by
launchinteractive.
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.
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?
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.Are you able to try install https://wordpress.org/plugins/wp-crontrol and see if the cron exists in the list.. perhaps see if you can manually run it.
-
This reply was modified 5 years, 8 months ago by
The topic ‘Does not minify’ is closed to new replies.