jQuery error breaking the main thread
-
While debugging why other features on our site were not working I came across this error in the console.
“jQuery(this).hideShow” is not a function
The line in question is from line 74 in this file
/plugins/photo-gallery/js/bwg_frontend.js?ver=1.5.14I have seen caching and minification being referenced as a possible cause for the issue, however we are not doing that on this particular site.
The main issue here is not even that the photo gallery isn’t working but it is creating errors that are uncaught and bubbling to the main JS thread, thus preventing other scripts on the page to work. There is no additional error handling or IIFE wrappers to prevent the bubbling.
For now I have just manually updated that script in the plugin and added a try{} catch(e){} block around the line that is creating the error.
That is at least preventing the plugin from breaking other scripts.
The topic ‘jQuery error breaking the main thread’ is closed to new replies.