Loading...

Contact Form 7 spins

Mar-15-2013 | Author: | Customizations, Troubleshooting, Web

code

While maintaining one of my websites today, I noticed when I submit the contact form, that the ajax icon at the button would just spin and spin with no real indication that the form was being sent. It was however – every time I clicked submit. The WordPress site uses the very popular Contact Form 7 plugin in its latest version. The site, however, uses a theme which the developer hasn’t updated in quite some time. And usually that’s fine, except when it comes to outdated scripting. Using Google Chrome, I went to the contact form and hit F12, revealing the developer tools. I had a few messages in there but nothing related to jquery, javascript or the plugin/form itself. But when I clicked submit on the form, the issue showed up.

Uncaught TypeError: Object function (E,F){return new o.fn.init(E,F)} has no method
'isPlainObject' scripts.js:25
$.ajaxForm.success scripts.js:25
h.success jquery.form.min.js:12
I jquery-1.3.2.min.js:19
N jquery-1.3.2.min.js:19

I searched the internet for “Contact Form 7 has no method ‘isPlainObject'” but really didn’t see anything that related to my issue except the mention of jquery. So I found where in my theme it referenced jquery and noticed that it made a call to the theme’s storage of jquery 1.3x. Having read the article “3 reasons why you should let Google host jQuery for you” I opened up the theme’s header.php and replaced the reference with a call to the latest jquery in google’s repository, version 1.9.x. That fixed the Contact form issue but it broke the sites navigation – it’s a one page site that uses anchors in the menu to scroll down to the page’s contents. I looked through the sites script files, mainly script.js and noticed that the comments said it required version 1.5 of jquery. So I found a link to googles jquery 1.5 and plugged that. Ba-Boom! Everything works. Hey I’ll take it.

So if you’re having symptoms like my site was, give this a go.