WP Rocket Main Menu conflict

Posted in: Newspaper
Post count: 257

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?

Post count: 35449

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!

Post count: 257

Hello and thank you for the answer.
Which JavaScript do I need to add as an exception? Which JavaScript is necessary for the menu?

Post count: 43

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.

Post count: 12

Same problem.
Which Javascript works with the menu?

Post count: 35449

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!

Post count: 43

I tried excluding all of those, but same problem.

Post count: 128

Hey, I don’t think that’s a problem with the motive. wp-rocket after updating to 3.9 there are problems with it, not only these.
Regards n

Post count: 35449

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!

Post count: 112

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

Post count: 112

Hey, did you find a solution to this yet?

Post count: 128

Hey,
and did you check wp-rocket settings and recommendations for the newspaper?
Because when I did it according to their instructions, the menu works fine

regards n

Post count: 112

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?

Post count: 128

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

Post count: 112

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?

Post count: 128

and without the rocket everything works fine?
maybe some other plugin is causing the conflict or setting!

Post count: 112

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.

Post count: 128

I used your rule and the menu stopped working properly!

Post count: 112

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

Post count: 128

no, I don’t have anything extra written in there

Post count: 112

Hmm, thank you for helping anyway!

Post count: 20685

Hi,

@Alastair Dixon I will try to help with this. The best way would be to send us an email, with the website and the login, so we can make some tests there. Let us know.

Thank you!

Post count: 257

Hi, after I created this thread and there was no solution, I just took my submenus out.
I have now added them back in. Apparently the problem is fixed.


@Team
: Have you fixed the problem?

Post count: 257

Sorry, my mistake. It does not work after all.
It only works when you are logged in to WordPress. Sorry.

Post count: 112

thats the same for me.

Viewing 25 posts - 1 through 25 (of 39 total)
You must be logged in to reply to this topic.