Wp-rocket: In WP Rocket 3.8.0.1 the Perfmatters Lazyload script gets deferred when Defer JS is enabled, breaking its functionality

Created on 21 Dec 2020  路  5Comments  路  Source: wp-media/wp-rocket

Before submitting an issue please check that you鈥檝e completed the following steps:

  • Made sure you鈥檙e on the latest version - Yes
  • Used the search feature to ensure that the bug hasn鈥檛 been reported before - Yes

Describe the bug
In WP Rocket 3.8.0.1, the Perfmatters Lazyload script gets deferred when Defer JS is enabled, breaking their lazyload functionality.

To Reproduce
Steps to reproduce the behavior:

  1. Update to WP Rocket 3.8.0.1
  2. Enable Permatters Lazyload, disable WP Rocket Lazyload.
  3. Visit the website and see the console error: "Lazyload is not defined". the images won't load
  4. Add exclusion: /wp-content/plugins/perfmatters/js/lazyload.min.js
  5. Lazyload should be working as expected

Expected behavior
We should automatically exclude Perfmatters lazyload script from being deferred

Screenshots
https://jmp.sh/oGOEKUp

Additional context
Related ticket:
https://secure.helpscout.net/conversation/1372699297/224831/

Backlog Grooming (for WP Media dev team use only)

  • [ ] Reproduce the problem
  • [ ] Identify the root cause
  • [ ] Scope a solution
  • [ ] Estimate the effort
3rd party compatibility defer JS bug wontfix

All 5 comments

@alfonso100 It's a bit unclear from the ticket. But is this something new with 3.8? Or did the issue happen with <3.8 versions too?

I believe L2 directly adds such exclusions with a PR, right?

I had a look at the Permatters website and they don't defer their lazyload file:
screenshot

All other JS files are deferred, so I suppose it's voluntary to have excluded their lazyload file.

I'm going to contact them to have more info and to know if they can do the compatibility on their side.

FYI, I have just contacted Brian Jackson about this problem.

Hey guys!
Thanks for roping me in. We did some testing today and can see that it appears to have changed with WP Rocket 3.8+. We now have a fix in place on dev, and it will get pushed out in the next update of Perfmatters.

Thanks

Thanks @brianleejackson for the confirmation and the fix on your side. I'm going to let our team know about the coming update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Screenfeed picture Screenfeed  路  5Comments

engahmeds3ed picture engahmeds3ed  路  4Comments

maximejobin picture maximejobin  路  4Comments

webtrainingwheels picture webtrainingwheels  路  5Comments

leurdo picture leurdo  路  4Comments