Hello, I have a conflict with Main Submenu and WP Rocket.
I found out that the conflict occurs when the plugin wp rocket is enabled.
I also found out that “javascript delay execution” is causing the problem. I now want to add an exception but don’t know which JavaScript is the correct one.
You can reproduce the problem here: m o d u s x . d e
When hovering over the three highlighted points >> https://nimb.ws/9UREJ7 nothing happens. Also click you can not.
If I disable WP Rocket it works.
I have already added an exception. Unfortunately it does not work: >> https://nimb.ws/hP3e9Y
Which JS is responsible for this? What can I add as an exception?
Hi Patrick93,
For the moment the JavaScript from our theme is all set in only few files, therefore, setting the files to exceptions will be like unchecked the option for javascript in WP Rocket. Now this is an untested plugin and maybe there are more ways to use it, but, disable minification for the JavaScript from WP Rocket for me seems to be the better solution.
Thank you!
I just spent the day trying to figure out the same issue and was unable to get it to work. Basically the main nav menu links were no long clickable and the drop downs didn’t work if Delay Javascript Execution is enabled in WP Rocket.
I tried excluding every js resource that was being loaded and still the main nav menu was broken.
Let me know if you figure it out. It would be great to be able to use this feature.
Hi,
Unfortunately, I do not know the WP Rocket plugin how need to be set because we didn’t test it, but I found this guide about it https://docs.wp-rocket.me/article/106-my-site-is-broken -> https://docs.wp-rocket.me/article/915-find-the-right-js-files-to-exclude-from-minification.
Also those are all the js file that contain code for mobile menu:
-> wp-content/plugins/td-cloud-library/assets/js/js_files_for_front.min.js
-> wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js
-> wp-content/plugins/td-composer/mobile/js/tagdiv_theme.min.js
-> wp-content/themes/Newspaper/includes/js/tagdiv-theme.min.js
-> wp-content/themes/Newspaper/includes/js/tagdiv-theme.js
If you are using a the responsive version of standard pack is use a file, for cloud, a different one, for mobile theme another one and so on.
I hope this will help you!
Hi,
Unfortunately, this is all I can do, since this is an untested plugin, I do not know the settings from it and how it should work.
The only advice I have is to find the option from Wp Rocked that prevent the mobile menu to work and disable it.
Thank you for your understating!
Hey there,
Did you figure out a solution to this? I’ve been looking into it too – driving me crazy because I want to use WPRockets Delay JS Execution due to the huge Core Web vitals improvements it offers.
-Alastair
Hey, yes I did add those recommended exclusions but drop down menus and the live search do not work correctly in the header menu. Do you have drop downs or a search in your menu?
yes, I am using it and after adding the rule for the newspaper, everything works fine
did you use this rule?
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js
/jquery-migrate(.min)?.js
/wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js
tdBlocksArray
Hey,
I’m using the same ones with additional ones that I thought may help, but still the same issue.. Here are mine:
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js
/jquery-migrate(.min)?.js
/wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js
tdBlocksArray
/analytics.js
js-(before|after)
(?:/wp-content/|/wp-includes/)(.*)
/wp-content/plugins/td-cloud-library/assets/js/js_files_for_front.min.js
any ideas?
Yeah all is good without WP rocket, apart from slow loading speeds đ It’s definitely the defer JS execution setting – and I’m on the latest theme version.
I was hoping that would word but sadly not. Same thing… Search doesnt load when you click it or the drop down menus.
Do you have anything in these settings? (image attached)
https://snipboard.io/Of4CyL.jpg
-
This reply was modified 4 years by
Alastair Dixon.
