Issue with Javascript Minifyig
After minifying the javascript, the website main menu messes & sliders faling apart
WP 6.22
WP Optimize 3.2.15
Brizy 2.4.18
Brizy Pro 2.4.16
-
Hi Shrinivasan,
I am unable to replicate this issue. Can you please share a screenshot of the settings under WP Optimize - Minify - Javascript tab? We would like to attempt the same settings at our end.
Brizy 2.4.18 goes along with Brizy Pro 2.4.17. Can you also install this version of Brizy Pro?
0 -
here is the staging site for you to play around
https://www.therapycarept.com/stagetwo/
but brizy Pro 2.4.17 shows compatible only upto wp611
0 -
Hi Shrinivasan,
I have looked at your staging site. Here are my impressions.
In your WordPress Dashboard under WP Optimize - Minify - JavaScript tab, when you enable the option, "Enable merging of JavaScript files" it causes a browser console error "Uncaught SyntaxError: Unexpected token 'function'" When JavaScript files of multiple plugins are combined, a code conflict occurs in the combined file. The code conflict can be between any two plugins within your WordPress Dashboard and need not be between Brizy and WP Optimize.
This syntax error causes the hamburger menu to be dysfunctional. If you do not combine the JS files, you can avoid the syntax error and the hamburger menu can work well.
In my test website, when enabling merging of JavaScript files, it does not cause a syntax error and the hamburger menu works fine. Hence the syntax error may not be due to a compatibility issue between Brizy and WP Optimize Please watch this video for my test: https://jmp.sh/s452vnA5
0 -
Thanks for the update
What I found is enabling either one of them "Enable minification of JavaScript files" or " Enable merging of JavaScript files" causes the syntax error. So I enabled the next option i.e "Contain each included file in its own block (enable if trying to isolate a JavaScript error introduced by minifying or merging)" which didnt show any console error.
Here is my latest setting, it works now, hope it wont create any issue further
Thanks once again
0
Please sign in to leave a comment.
Comments
4 comments