wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
687 stars 215 forks source link

Defer JS compatibility with Toolset Views #5078

Closed DahmaniAdame closed 2 months ago

DahmaniAdame commented 2 years ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug

When the Toolset View is added to a page where Defer JS is enabled without any exclusions, the content of the view doesn't show up, and the following error is added to the browser's console:

Uncaught ReferenceError: wpv_pagination_local is not defined
    at new a.ViewFrontendUtils (views-frontend.js?ver=1653476181:1:11193)
    at HTMLDocument. (views-frontend.js?ver=1653476181:1:78021)
    at e (jquery.min.js?ver=3.6.0:2:30038)
    at t (jquery.min.js?ver=3.6.0:2:30340)

The issue is fixed by excluding jQuery.

To Reproduce Steps to reproduce the behavior:

  1. Create a View + defer JS without any exclusions
  2. See error

Expected behavior The View should work without requiring any exclusions.

Screenshots N/A

Additional context Ticket - https://secure.helpscout.net/conversation/1896219114/344902/

Backlog Grooming (for WP Media dev team use only)

piotrbak commented 2 years ago

@DahmaniAdame I've just asked for this plugin, will reproduce it on our own environments.

piotrbak commented 2 months ago

We did not have any feedback from customers about this issue.