Major issue since last update – WP’s underscore JS library dequeue?
-
Hi,
I’m a senior developer and I’ve developed a premium WordPress theme called Sonaar. Over 25 000 websites use our theme.
We also strongly recommend to use Contact Form, it’s a nice plugin.
Our theme uses AJAX to load the new page content. We also use the popular JS library underscore which is shipped directly with WordPress.
Since Contact Form 5.4 update, we have a very major issue.
Contact form seems to dequeue underscore library somehow when AJAX is used.To see the issue go to http://wordpress-122413-615135.cloudwaysapps.com/
Open the menu.
Click on “News”
The submenu will open (It works fine!)
Click any sub-menu items to load the page.Now, retry to open the “news” submenu items in the menu: It doesnt work anymore. Our script use underscore library and it seems that Contact Form unload it somehow.
As you can see we have this JS error when are trying to open the submenu.
“sonaar.scripts.min.js?ver=4.20:3887 Uncaught TypeError: Cannot read property ‘contains’ of undefined”The underscore function _.contains() is undefined after we change the page content through the menu and it is when we refresh the browser. This was not the case with CF7 5.3.2 and all other previous version. For some reason, since the last CF7 update, the JS underscore library loaded by wordpress, is not loaded anymore when we navigate with Ajax.
With previous Contact Form version, it used to works fine. You can try on https://demo.sonaar.io/streamking/ running with CF 5.3.2
You understand that is a major issue for us since over 25 000 websites that use our theme and contact form will get this issue when they will update CF !
Please advise,
Thanks!
The page I need help with: [log in to see the link]
The topic ‘Major issue since last update – WP’s underscore JS library dequeue?’ is closed to new replies.