cncf / cncf.io

☁️♮🏛🚧 The CNCF.io WordPress website
https://cncf.io
MIT License
84 stars 38 forks source link

Uncaught TypeError: b is undefined (jquery.masonry.min.js?ver=3.1.2b) on Speakers profile page #302

Closed thetwopct closed 4 years ago

thetwopct commented 4 years ago

seungkyua

The current UM on WP5.5 seems to be throwing an error on singular speakers profiles. I feel like its probably related to UM loading old scripts and relying on jQuery Migrate. Their support team seem to think that installing this plugin will help although I am highly doubtful. We may also want to review the UM asset dequeue to make sure this is not causing this issue.

Could this be the cause of https://github.com/cncf/cncf.io/issues/235?

thetwopct commented 4 years ago

Maybe it's not UM, as weirdly I see the error on Members too https://www.cncf.io/about/members/ (but none of the other pages with landscape embedded 🤔)

cjyabraham commented 4 years ago

Could it be scripts are getting loaded in the wrong order on certain pages?

cjyabraham commented 4 years ago

The members page was loading the UM assets unnecessarily so I have fixed that and now there is no error on that page. So that brings us back to the error originating in the UM assets.

cjyabraham commented 4 years ago

It looks like this was a script ordering issue. The way we were deferring scripts was causing the jquery.masonry.min.js not to be deferred while all other UM scripts are deferred. I've fixed it to defer it with all the others.