Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - Contact Form 7 - Stuck sending contact form

When i try and send my standard contact form in Wordpress using Contact form 7 then it get stuck sending. The form works, i do get the mail to my inbox but visually on the homepage, the form get stuck in "sending mode".

Chrome console say this

Uncaught TypeError: Cannot read property 'dispatchEvent' of undefined
  at Object.wpcf7.triggerEvent (scripts.js?ver=4.9.1:361)
  at ajaxSuccess (scripts.js?ver=4.9.1:279)
  at Object.<anonymous> (scripts.js?ver=4.9.1:344)
  at i (jquery.js?ver=1.12.4:2)
  at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
  at y (jquery.js?ver=1.12.4:4)
  at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)

And firefox console says:

TypeError: $target.get(...) is undefined[Läs mer]  scripts.js:361:3
  wpcf7.triggerEvent http://***.se/wp-content/plugins/contact-form-7/includes/js/scripts.js:361:3
  wpcf7.submit/ajaxSuccess http://***.se/wp-content/plugins/contact-form-7/includes/js/scripts.js:279:6
  wpcf7.submit/< http://***.se/wp-content/plugins/contact-form-7/includes/js/scripts.js:344:4
  n.Callbacks/i http://***.se/wp-includes/js/jquery/jquery.js:2:27444
  n.Callbacks/j.fireWith http://***.se/wp-includes/js/jquery/jquery.js:2:28213
  y http://***.se/wp-includes/js/jquery/jquery.js:4:22719.send/c

Do you have good solution to my problem?

like image 672
Kenny Avatar asked Nov 03 '17 10:11

Kenny


People also ask

Why is my WordPress contact form not working?

You need to make sure that you've set a valid email address in the widget's settings. Check your browser's error console for Javascript errors, and fix them if you have any. If you are an Elfsight form widget user and have a WordPress version of the widget, then check that your server supports mail function.

Why am I not receiving emails from my contact form on WordPress?

There are three main reasons why form notifications may not be received in your email inbox: Your form settings are not set up properly and may be sending to an incorrect email address. Your email client/provider has a filter and/or thinks these emails are spam.


1 Answers

In my case the error was caused because i had a file upload field in my form to upload an attachment, and the file was exceeding the post_max_size and upload_max_filesize (php/apache settings). When i changed these two, the problem was gone.

like image 196
Andre Avatar answered Oct 26 '22 22:10

Andre