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
Hi Matthieu,
Wow, thanks for digging into this. You did most of the troubleshooting for me :). Thanks for narrowing down the issue for me and for others who may see this.
I’ll also look more into what’s going on here and see if I can find a solution.
Since we have at least a temporary or work around solution for this – excluding the dompurify script – and since the issue obviously evolves from that third party script itself, I’m going to mark this issue resolved. But I’ll still consider it something we need a better long term solution for.
Worth noting that the dompurify script/package that’s conflicting with autooptimize here is massively popular. It is effectively the standard script for sanitizing content in JavaScript ecosystem and gets about 6 million downloads per week. Given all that, I’m quite surprised at the conflict.
-
This reply was modified 1 year, 8 months ago by
Firelight.
Frank from Autoptimize here; the problem turned out to be specific to having “add try/catch block” on which is off by default and which we discourage being activated 🙂
@optimizingmatters – Thanks so much for following up here with an update. Much appreciated, and glad to see this is resolved.