Home Forums WoodMart support forum Bug with wp rocket

Bug with wp rocket

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #365705

    webreturn
    Participant

    Dear 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 delay

    When 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

    #365733

    Artem Temos
    Keymaster

    Hello,

    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

    #367763

    webreturn
    Participant

    Hi,

    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

    #367792

    Artem Temos
    Keymaster

    Hello,

    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

    #369714

    webreturn
    Participant

    Hi. 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.

    #369853

    Artem Temos
    Keymaster

    Hello,

    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

    #370227

    webreturn
    Participant

    Romain 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.

    https://prnt.sc/42GIppfmXzKl

    Best regards, Tim

    #370694

    Artem Temos
    Keymaster

    Hello,

    Could you please send us a link where we can see this and record a short video that demonstrates the problem?

    Kind Regards

Viewing 8 posts - 1 through 8 (of 8 total)