Blogvaria

This page is brought to you by Blogvaria (http://blog.evaria.com).

To obtain more information, ask questions and interact please visit our website.

Back to Blogvaria landing page
Feedback
Subscribe
   
Blogvaria

 

The personal pages

Custom WP forms and 404 errors

TrackBack | Filed by Thomas under Plugins, WordPress | Post popularity 13%

Recently I’ve been building various custom form plugins for WordPress. And even if it all seemed to work properly I would get an “404 page not found” error instead of my “thank you page”. I know I’m not the only one as this has been reported before.

The reason this happens is basically due to the fact that some form values should NOT be used as they will cause a conflict with the variables passed by WordPress itself. Among them are values like: name, day, year etc.

So, if you are running in to this issue/bug yourself you can isolate the “forbidden” values by simply filling in one value on the form after another and performing a quick submit between each and every one. As soon as you get the 404 error you will know you’ve found one (of potentially several) values you will have to rename.

What you need to do then is give your form field (e.g. text input, textarea or select box) a new name. A field named “year” could then be passed on as “dyear” or similar. Nothing more to it actually.

Please feel free to comment should I’ve left something out, or leave a thank you if I saved you some headaches and time :)

Happy coding!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • BlinkList
  • blogmarks
  • del.icio.us
  • De.lirio.us
  • digg
  • Furl
  • NewsVine
  • Netscape
  • Reddit
  • Spurl
  • SphereIt
  • Technorati
  • YahooMyWeb
  • DZone
  • feedmelinks
  • Linkter
  • Ma.gnolia
  • Slashdot
  • StumbleUpon
  • TailRank
  • co.mments

No comments yet.

Leave a Comment

Akismet has protected Blogvaria from 108,709 spam comments. Design by Evaria.com. Powered by WordPress.
Our beloved and trusted server has rendered 37 pages so far today, an amazing 4.715 pages yesterday
and even more astonishingly 206.908 pages since 29 Jan 2010 alone without dropping a byte nor a pixel.

Close
E-mail It