skip to Main Content

Seem to be getting an error on our contact forms on version 5.4.1 and the version before using the Contact Form 7 plugin on WordPress. The error occurs when submitting the form regardless of entering information or not. The error which appears in console is as follows:

TypeError: Cannot read property 'querySelector' of null
at c (index.js?ver=5.4.1:1)
at Array.forEach (<anonymous>)
at index.js?ver=5.4.1:1

Read a couple of articles about rolling back to version 5.3.2 which I can confirm works and the issue isn’t present in this version. Does anyone have a fix for it though? Or do we need to wait for another update? It’s been a couple of weeks now since this was first found I believe.

If anyone needs any other information please let me know and I’ll try to supply it.

Thanks!

2

Answers


  1. This is due to a incompatability between your theme or a plugin with the new version of jquery used in wordpress. There are a few things you can do.

    • Update your theme and plugins and hope the JavaScript is patched by the author
    • Try to patch the broken code your self (this requires knowledge of javascript)
    • Install jQueryMigrate Plugin (this is only a Band-Aid and should not be the permanent solution)
    Login or Signup to reply.
  2. You can edit

    define( ‘WPCF7_LOAD_JS’, true );
    

    to

    define( ‘WPCF7_LOAD_JS’, false );
    

    on wp-contact-form-7.php file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search