SOLVED: Console Error Message: TypeError: Cannot read properties of undefined (reading 'offsetLazyLoad') at bricksLazyLoad

Bricks Version: 1.5.6
Browser: Safari 16.1
OS: macOS

Noticed this error logged in one of my client sites running Bricks 1.5.6:

TypeError: Cannot read properties of undefined (reading 'offsetLazyLoad') at bricksLazyLoad (https://<web-domain>/wp-content/themes/bricks/assets/js/bricks.min.js?ver=b38e2f284550:1:2556) at https://<web-domain>/wp-content/themes/bricks/assets/js/bricks.min.js?ver=b38e2f284550:1:41560

While the editor is fine for me (loads totally fine and pages load fine too, just a console error is all), I noticed a similar console error message described in this post: SOLVED: Getting a blank bricks editor page. Error in console

I don’t have Flying Scripts (mentioned in the above post) but I do have Flying Press. Disabled Flying Press and the console error went away. I’m confused though why this lazy loading functionality is even called in the first place when it’s disabled in Bricks Builder Settings, any ideas why this is happening? I’ll open a ticket with Flying Press too just in case it’s an issue on their end (which seems it may be, but seems so strange that a Bricks function is being called when it’s explicitly disabled in Bricks Builder settings.

Hi Dustin,
Thanks so much for your report!

Have you already received feedback from the Flying Press team? We don’t use Flying Press yet and therefore can’t reproduce the error directly. Can you possibly send us temporary access data?

Best regards,
timmse

I opened a case just today actually with the FlyingPress team. I gave them a temporary access link so I can certainly send one to you too separately. Will be in touch. :slight_smile:

Update: email sent to help@bricksbuilder.io with login link.

Looks like it was a bad configuration on my side in FlyingPress. I had set a keyword of ā€˜recaptcha’ in the FlyingPress Delay Scripts Until User Interaction feature. Unfortunately this caused an unintended conflict in Bricks’ own scripts (as I understand it at least) since one of the files has text for recaptcha in it, thus why it wasn’t defined properly and thus the error message in the console. Removing that particular keyword in the FlyingPress configuration resolved the conflict, and I have reintroduced it with a more narrowly scoped wording to avoid the conflict in the future.

This could also be resolved by disabling the delay scripts feature by URL. I’m not sure if FlyingPress has it, however Flying Scripts does.

Simply add this to the ā€œDisable on pagesā€ box:
?bricks=run

1 Like