wp-media / wp-rocket

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

DJE compatibility with Woo Product Filter PRO range slider #5652

Closed DahmaniAdame closed 1 year ago

DahmaniAdame commented 1 year ago

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

Describe the bug

When Woo Product Filter PRO is used with Delay JavaScript Execution, while the range slider filter is used, the following error shows up:

Uncaught TypeError: filter.find(...).ionRangeSlider is not a function
    at WpfFrontendPage.initIonSlider (frontend.woofilters.pro.js?ver=1672211369:37:319)
    at HTMLDivElement. (frontend.woofilters.pro.js?ver=1672211369:1:488)
    at Function.each (jquery.min.js?ver=3.6.1:2:3003)
    at S.fn.init.each (jquery.min.js?ver=3.6.1:2:1481)
    at wpfEventsFrontendPro (frontend.woofilters.pro.js?ver=1672211369:1:456)
    at WpfFrontendPage.eventsFrontendPro (frontend.woofilters.pro.js?ver=1672211369:36:83)
    at HTMLDocument. (frontend.woofilters.pro.js?ver=1672211369:66:193)
    at e (jquery.min.js?ver=3.6.1:2:30038)
    at t (jquery.min.js?ver=3.6.1:2:30340)

Excluding the following from Delay JavaScript Execution fixes the issue:

/woofilter-pro/woofilterpro/js/ion.rangeSlider.min.js

To Reproduce Steps to reproduce the behavior:

  1. Woo Product Filter PRO with the range slider
  2. Enable DJE
  3. See error

Expected behavior The range slider should work correctly out of the box.

Screenshots N/A

Additional context Ticket - https://secure.helpscout.net/conversation/2106651637/390944/

Backlog Grooming (for WP Media dev team use only)

DahmaniAdame commented 1 year ago

Added exclusion to Delay JavaScript Execution backend.