Ver. 2.3.4 breaks JS minification using plugin Autoptimize

[ad_1]

Hi,

I did update some JS code, and re-minified our JS files for the lightboxes. But autooptimize should be able to handle a situation where another plugin updates its own JS.

You don’t happen to know what the error was that you saw do you? If you are open to it, it would be great if you could temporarily stop excluding our JS, try it again, and if the error appears, just copy that here. That would give me a sense for what the issue might be. You could then add the exclusion back if needed.

Thanks!

Thanks for the prompt reply.

Logged error in the browser console was Uncaught SyntaxError: missing } after try block <- try / catch block comes from the plugin Autoptumize. When looking into the code location of the error, it points to the purify js lib. Thus, I was able to drill down the exclusion to purify.min.js and it apparently still works as an expected. Apparently, this 3rd party lib is the root source for the issue.

Path to exclude from Autoptimize: wp-content/plugins/easy-fancybox/vendor/purify.min.js or even more generic, if any other plugin is making use of Dom purify: vendor/purify.min.js.

I also tried to replace the bundled version 3.1.5 in your plugin by the latest release 3.1.7 of lib dom purify from the GitHub repo, but it does not fix the error at. I have tried the minified and un-minified version, both result in the same error. Thus, I will open a support ticket at Autoptimize to look into this as well.

Many thanks!

Matthieu

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer