Automptimze Javascript breaking Theme Foundry Menus
-
Hey Frank,
Hope all is well.
I’ve seen recently an issue on some of my sites where when activated, the Javascript minification is breaaking the Make Theme from The Theme Foundry’s drop down menus, which just simply won’t drop down.
I did install the ASYNC plugin to see if that would help, but it does not. I just left it on the basic settings.
This is the second site I’m having an issue with. The first, 67biltmore.com, I’ve turned off Autoptimize for now until I can figure out a solution.
Please be reminded, I’m not a developer – I’m a product owner, so I’m not specifically knowledgeable about some of these things and need a little hand holding to get past it.
Now that it’s happened on two different sites, but not others, I just don’t know what it could be. Because when I disable Javascript, it works. When I re-enable, it doesn’t. I haven’t changed any settings. Only the first box is checked.
Thanks,
Tony
The page I need help with: [log in to see the link]
-
morning Tony;
can you try adding/themes/make/jsto the comma-separated JS optimization exclusion list?frank
Thanks, Frank.
I tried that and dumped caches at WP Engine and Cloudflare, as well as the Autoptimize cache. I also tried catch wrapping with the /theme/make/js to the comma separated exclusion list, but it’s still stuck with no drop down capability.
Here’s a screenshot of the settings for JS: https://cloudup.com/co1AJeWLp5x
I unticked cache wrapping, because it didn’t change anything. I also tried to force js in the head, but that didn’t work either and I tried to force javascript in the head with cache wrapping ticked, but that didn’t do anything either.
I *think* the problem now is due to the use of async’ing, can you disable async JS for a second to confirm?
Hmmm…nope, that didn’t do it. I disabled the ASYNC plugin completely.
I also tried catch wrapping on/off again.
I cleared the Autoptimize cache, the cloudflare cache, my browser cache, and the WP Engine cache and it’s still not displaying the dropdown with JS minification enabled.
Frank,
I did add the comma separated
/themes/make/jsto https://67biltmore.com/ and after a refresh and clearing the cache, it does seem to work on that site for now. But, I didn’t take the new Autoptimze update on that site yet, either.OK, got it π
The issue is not with JS optimization, not with CSS optimization (as such), but with the critical CSS you’re using (and it’s broken on both your sites).
The critical CSS contains this (edited somewhat for brevity);
@media screen and (min-width:800px) { .site-navigation .menu .sub-menu { display:none; overflow:hidden; position:absolute; z-index:99999; } }it’s the
display:none;that is breaking the menu dropdowns.One solution could be to add this to the normal CSS (e.g. in appearance -> customize -> additional CSS);
@media screen and (min-width:800px) { .site-navigation .menu .sub-menu { display:unset; } }Maybe test if after that you can remove
/themes/make/jsfrom the JS exclusions?hope this helps,
frankAh! Good catch. Thanks so much.
I’ll try that then and see what happens.
Will report back shortly.
Yep, that worked on both sites.
I’ve updated Theme Foundry, so they are aware of the issue.
Thanks for your help. As always, you’re a committed and serious WordPress professional and I do appreciate everything you’d done to help me and my clients optimize page speed for better SEO.
I have about 5 sites now that are all ranking page 1 for various keywords and one of the reasons is your plugin. Without it some dropped a little, so having this piece of the puzzle solved is very valuable.
Happy to hear to Tony, have a nice day! π
The topic ‘Automptimze Javascript breaking Theme Foundry Menus’ is closed to new replies.