• 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]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Pepper_Brand_Managers

    (@pepper_brand_managers)

    I have a similar but different problem – using Understrap on about 30 sites. The submit button no longer triggers a submission. I’m assuming the issue is related.

    I’m currently going through all my sites reverting to 5.3 before my clients notice a complete drop off of enquiries.

    If you look here in the forum at the threats of the last days, then many problems of the most different kind come up since the CF7 update to V5.4. The communication here in the forum to this topic is very bad.
    I found out that my problems were completely gone when I switch to a default WP theme (twenty twenty-one). I got in contact with the developers of my theme (Enfold by Kriesi). A few hours ago they published a theme update that solved my problems. I’m still waiting for feedback on what exactly the problem was. Maybe this info can help you. As soon as I know something, I’ll post it here.

    This may not be related but CF7 v5.4 broke some of my website functions. If you are using a caching plugin, see my suggested below.

    Caching CF7 JavaScript can break the functionality of the form, animations and other things site wide.

    I’m using theme Enfold v5.8 and CF7 5.4 and WP-Rocket v3.8.5 for caching. – all the latest versions.

    In WP-Rocket under FILE OPTIMIZATIONS I had to disable the following options:

    1. Combine JavaScript files
    2. Load JavaScript deferred

    I assume similar settings in other caching programs will resolve the issue.

    I can exclude CF7 files from being combined or deferred but I don’t know which files those are. Could you tell me what CF7 JavaSCript files to exclude?

    I would not say this is a theme issue. It seems related to caching/minifcation/optimisation. Maybe your theme did that, and they changed the way it works? But it’s unreasonable to expect all other themes and plugins to update to work with CF7. CF7 needs to be fixed to work with them. In my case it breaks with WP Rocket or Supercache or Autoptimize. Rollback to 5.3.2 is the only solution I found now because not using these plugins is not an option. We also use Complianz plugin for GDPR cookie policy law, and they have announced their plugin also breaks regarding ReCaptcha cookies (so websites wont be legally compliant), and so to rollback to 5.3.2.

    So its a major issue and I have not seen a statement from the developer yet.

    • This reply was modified 5 years, 3 months ago by amityweb.

    @amityweb, I agree with you. But for me as an end user, it doesn’t matter who solves my problem. In my case it was theme changes. This is such a complex issue and many factors play together. There are dozens of practical solutions. Also, it is bad style of CF7 to release such massive changes without prior extensive testing with the most widely used themes. I had already started a thread days ago asking for comments from the developers. Only standard answers, nothing else.

    https://ww.wp.xz.cn/support/topic/version-5-4-known-problems-please-post-current-status/

    I am very upset about this as well.

    Pepper_Brand_Managers

    (@pepper_brand_managers)

    I did remove caching and this did not solve the problem. Others are reporting issues with reCaptcha integration so as I was using a honeypot I removed it. That seems to be fixed but my clients now have forms open to bots.

    I’m praying this is a short-term issue.

    Thread Starter sonaar

    (@sonaar)

    @takayukister any news about this?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Contact form seems to dequeue underscore library somehow when AJAX is used.

    Why do you think so?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Major issue since last update – WP’s underscore JS library dequeue?’ is closed to new replies.