Home › Forums › WoodMart support forum › Bug with wp rocket
Bug with wp rocket
- This topic has 7 replies, 2 voices, and was last updated 2 years, 7 months ago by Artem Temos.
-
AuthorPosts
-
April 1, 2022 at 12:16 pm #365705
webreturnParticipantDear developers of Woodmart,
We have followed the advice on how to optimize our webshops with WP Rocket, and it works great.
There is a bug however, if we click on the button to open the sidebar on a shop page when we enable Delayed JavaScript execution in WP Rocket, there is a delay between clicking i tand the sidebar actually opening.This bug happens on every Woodmart webshop that uses Delayed JavaScript execution with WP Rocket.
Website: See private content
We have digged into how this could be possible and this is what we figured that happened:
1. The event listener is added to the button, so that is all good
2. When clicking the button, WP Rocket loads all remaining scripts as clicking the button means the user has interacted
3. As now the scripts are loading, the callback for the onclick/ontouch event is called after all the remaining scripts are done loading, which causes the big delayWhen we click the button programmatically using the element.click() function, the sidebar opens instantly and then WP Rocket does not load all the other scripts (since it doesn’t trigger when clicking programmatically).
Is it possible that the sidebar gets opened before loading all the scripts on user interaction (clicking the button)?
Best regards, Tim
April 1, 2022 at 2:15 pm #365733
Artem TemosKeymasterHello,
This mechanism is a part of the WP Rocket plugin and we can’t change the way it works in our theme. It starts loading all the scripts before the actual event (click). You can consult with WP Rocket support for help on this matter.
Kind Regards
April 12, 2022 at 5:57 am #367763
webreturnParticipantHi,
Thanks, but we have bought more than 30 licenses of Woodmart (see our account on Themeforest with user webreturn01. Please can you help us? Wp rocket is most used caching plugin and you said you supported WP rocket. We have asked them and they pointed to you, see below private details. Please help us. Woodmart is a great theme, but we are disappointed this is not working. Can you make something in Woodmart that this will working?
Best regards, Tim
April 12, 2022 at 6:58 am #367792
Artem TemosKeymasterHello,
We highly appreciate that you use our theme for most of your projects. But from your request, we still can’t get what is wrong with the theme itself. It is how the WP Rocket function works with any JS scripts, right? Could you please check with some other WordPress theme and let us know?
Kind Regards
April 20, 2022 at 5:44 pm #369714
webreturnParticipantHi. we have already had contact with WP rocket about this issue. WP rocket is willing to solve the problem, please can you contact Will (this is our contact at WP rocket) about this? The email of him is in the private content. We have 35 Woodmart theme licenses and also use WP rocket, so I really appreciate it if you can solve the problem with eachother. Please ask Will about the solution we have sent them.
April 21, 2022 at 9:45 am #369853
Artem TemosKeymasterHello,
Sure, we would be happy to help. Please, send us the email or ask him to send us a message using the contact form here https://themeforest.net/user/xtemos
Kind Regards
April 22, 2022 at 3:19 pm #370227
webreturnParticipantRomain from WP Rocket gave us an alternative plug-in, WP Meteor, to use for delaying JavaScript execution.
We have used that plugin, and it fixed the issue of a delay in opening the filters sidebar after clicking it (because of the JS files being loaded before the event callback has fired).This is a great step forward.
However, what happens now is that the sidebar closes a moment after opening it.
This is likely caused by one of the remaining JS files that are loaded due to clicking the button to open the sidebar (the scripts which are loaded on user interaction).Could you fix this? The same happens when opening the main menu inside the header.
Best regards, Tim
April 25, 2022 at 9:40 am #370694
Artem TemosKeymasterHello,
Could you please send us a link where we can see this and record a short video that demonstrates the problem?
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register