Just upgraded to WP2.8, AJAX is not working in CF7 and also, the terms acceptance checkbox which disables the submit button is not working either.
Any help would be appreciated.
Just upgraded to WP2.8, AJAX is not working in CF7 and also, the terms acceptance checkbox which disables the submit button is not working either.
Any help would be appreciated.
Indeed. :(
Really? It's working on my site. I'm using WP 2.8 + CF7 1.10.0.1.
I found a couple of bugs in wp-contact-form-7.php.
1) in function wpcf7_plugin_url( $path = '' )
global $wp_version;
Needs to be added before the first if statement so that the variable is available within that function.
2) in function wpcf7_enqueue_scripts()
TRUE should be removed as a parameter passed to wp_enqueue_script as it's not a valid parameter.
FYI, the whole point is that w/ those bugs the necessary JS files do not get included on the page via wp_head() in the templates.
1) in function wpcf7_plugin_url( $path = '' )
global $wp_version;
Needs to be added before the first if statement so that the variable is available within that function.
oops. I forgot the global declaration. Thanks jinkim.
2) in function wpcf7_enqueue_scripts()
TRUE should be removed as a parameter passed to wp_enqueue_script as it's not a valid parameter.
The fifth parameter of wp_enqueue_script is supported from WP 2.8.
http://core.trac.wordpress.org/browser/tags/2.8/wp-includes/functions.wp-scripts.php#L82
When the value is set as true, the script will be included in the footer, instead of the header.
Takayuki,
Would you please issue a patch for this problem?
You can see the changed point here.
http://plugins.trac.wordpress.org/changeset/125989/contact-form-7/trunk/wp-contact-form-7.php
If you need the whole package, download from here.
http://wordpress.org/extend/plugins/contact-form-7/download/
('Development Version' at the bottom)
Still, this fix didn't help with the AJAX issue.
Submit button isn't disabled before confirming the "terms" checkbox, plus AJAX is not functioning, in other words, the whole page refreshes after the form is submitted.
Maybe there are some JavaScript conflicts on your site. Can I see the site so I can point out the conflicts?
m u s a v i s . c o m
Takayuki, but it was working great on WP 2.7.1
Upgrading to WP 2.8 messed things up.
Oh, sorry! I forgot to mention this.
Since WP2.8, the javascripts of Contact Form 7 are loaded in the footer of the pages, instead of header. So you need to call wp_footer() in the footer.php of your using template, like wp_header() in header.php.
This article describes it in detail.
I inserted the following code at the top of my footer.php:
<?php wp_footer(); ?>
But still no use.
Okay, the javascripts came to be shown on the footer. Now another problem is conflict with other javascripts. By looking at the HTML source, jQuery.js is loaded twice (line #15 and #218), and FireBug shows error in the slider.js (#219). They are blocking the javascripts of Contact Form 7 from working.
I'm having the same problem re: Ajax. The forms submit and I get the emails, but the "your form was sent, etc" notice isn't working; the form just refreshes.
wp_footer(); is called in the footer. jQuery.js is called in the head and jQuery.form.js in the footer. I've tried removing them (first one, then the other), and it breaks the plugin, so I'm all out of ideas.
Hmm. Strangely enough, the issue seems to have resolved itself in my case.
Downgrading to WP 2.7.1 has fixed the problem temporarily.
Must be something in the WP 2.8 core that's causing all the mischief.
Takayuki, any ideas?
digitz, it is caused by javascript conflicts without a doubt. Try it on WP 2.8 with default theme and no other plugins. It should work.
Added the footer call and now working fine. :)
Though, can you please add an option so that it can still be loaded in the header?
Why? Well because I would like for it to work correctly with PHP Speedy again:
http://aciddrop.com/2009/02/02/php-speedy-wp-052-bug-fix/
Thanks!!
I'm currently working on a new theme for my website. I'll definitely try it out after I revamp my site.
Thanks Takayuki
Takayuki,
I installed Contact Form 7 1.10 on WP 2.8 and also get the "turning arrows" ajax image when testing the form on Firefox 3.0.11. It also does the same thing on Google Chrome. When testing form on IE 8, it works fine and returns "Your message was sent successfully. Thanks.".
After sifting through the WP forum and reading the many comments, I am stumped. Any outlook on addressing this?
Though, can you please add an option so that it can still be loaded in the header?
Whoooo! Thanks!
I am using WordPress 2.8.1 and Atahualpa 3.3.3 theme. I am using the plugin Contact 7 (version 1.10.1) form within the Text Widget (see http://www.lifem.org.uk). However, I have not received any email comment so far and did just a test email using one of my email accounts - got no email. So it seems something is not working... can you help please, as I am afraid many people will complain for not receiving any replies, when in fact I do not receive their emails...
I'm with the same problem, shaarp.
@shaarp @disllex this FAQ topic might be helpful for you.
Dang! I'm having the same problem.
Disabled all plugins, returned to default theme, ensured wp_footer() in footer.php, checked for js conflicts - there are none ... no cigar.
Downgraded to the previous version of Contact Form 7, success!
So, the only difference between the working and non working contact form is the version of contact form 7.
This topic has been closed to new replies.