Contact Form 7 404 Error – Wordpress Plugin

16 Jul 2009

We’ve used the popular Contact Form 7 plugin for Wordpress for most of our Wordpress projects.  It allows you to define multiple forms, with custom fields – ideal for longer or more complex contact / enquiry forms.

On one site, we encountered an issue where Wordpress would return a 404 error when submitting the form – although we’d still get the email containing the form information.  We’d configured Contact Form 7 with a single form, called “Contact”.  The code used to insert it into the Contact page was [contact-form 1 "contact"].

The workaround to fix the 404 error is to create a second form (we called ours “contactform”), and use [contact-form 2 "contactform"] on the contact page in question.  This cured the 404 issue.

The issue seems to surround the first form (possibly the preconfigured form provided when you install the plugin).  We’ve just left that form in the system, but don’t use it, and all other forms work without issue.

Comment #1

30 Jul 2009
  • Posted at 09:37:18
  • pravin

Hello I had “page not found”(Error 404) error on form submission.

I rectified it by adding
wp_footer();
line in footer.php of my theme.

Now it is working fine.

Comment #2

13 Aug 2009
  • Posted at 11:35:29
  • Tim Carr

Good point, pravin – it’s always worth checking you have wp_footer() in your theme’s footer.php file, as it can be used by plugins.

Comment #3

21 Aug 2009
  • Posted at 19:35:24
  • Sarah

Creating a second form and using it instead of the first/default did not work for me, but adding wp_footer to my footer file did. :) …I think. The form sent and didn’t take me to a 404, but I have not received the email, eek.

Comment #4

25 Aug 2009
  • Posted at 10:20:20
  • Tim

Hi Sarah,

It’s worth checking your Junk Mail or similar folder if you haven’t received an email from Contact Form 7. Depending on your email provider’s settings, they might also require a valid reverse DNS check to work – meaning you’d need to ensure the Contact Form 7’s from email address is a valid SMTP user.

Tim.

Comment #5

19 Nov 2009
  • Posted at 09:50:57
  • Greg Gillespie

Hey thanks for the wp_footer(); tip.
Saved my life…

Comment #6

09 Dec 2009
  • Posted at 06:40:18
  • Visual Rhythm

wp_foot () worked for me too!! Thanks Pravin!

Comment #7

08 Apr 2010
  • Posted at 04:33:12
  • Ed Torres

For me wp_footer(); did not work

Comment #8

19 May 2010
  • Posted at 11:24:14
  • Mehdi

wp_footer(); did not work for me too

Comment #9

26 Jul 2010
  • Posted at 10:37:27
  • Horváth Oszkár

Thanks for the wp_footer() tip. For us, we have disabled wp_head() because of too many versions of jQuery or Prototype being present. To solve this issue we had to re-enable wp_head and it worked, we’ve inspected which JS it needed as extra, and the turned it off again to prevent further errors. (Sometimes it is necessary to decide yourself in what order these scripts are referred to, the order itself can cause error or solve an issue.)

Post Comment