Forums

[resolved] 404 pops after custom form submission by POST (12 posts)

  1. crashD
    Member
    Posted 2 years ago #

    Short version
    I submit a custom form through POST, and WP returns unexpected 404.
    HELP!!

    Detailed version
    I have a custom form at a my WP blog. An example here: http://berg.com.ua/seminars/?order=1

    I am making a related seminar database, and users will be able to apply through such forms.

    I creater my custom template, created a page with that template, and have all the code in that template, and all the client-side functionality on that seminars page. Browsing done via GET parameters.

    The code for the form is meant to send email, and return the user to the current page. However, WP returns 404 error. The problem is that the URL does not change before and after form submission (except for the #client-form at the end).

    Please help avoid that problem. I need not that mistic 404 on my custom page after POST form.

  2. crashD
    Member
    Posted 2 years ago #

    Update: interesting enough. If you submit an empty form, the POST method works anyway and the form error messages appear, yet no 404 here. but only on the success does that freaky 404 appear.

    Please help. I don't know where even to start to look for the cause of the problem.

  3. crashD
    Member
    Posted 2 years ago #

    FAKE alert!

    The problem was caused by the "name" parameter posted. Obviously, WP has something important internal reserbed for that parameter, so I changed it to "clientname" and all worked fine.

  4. spencersokol
    Member
    Posted 2 years ago #

    Just ran into this same problem. For the life of me I couldn't figure out why I could view the page without POST data but with data it bombed the 404.

    I'm glad this explanation was here. Thanks.

  5. parahumanoid
    Member
    Posted 2 years ago #

    An addition:

    be advised that the following names are also reserved:

    "day"
    "month"
    "year"

  6. Eeky
    Member
    Posted 2 years ago #

    Ah god, thank you very much.. I've been trying to figure this out for hours..

  7. johndoeherty
    Member
    Posted 2 years ago #

    Many torn-out hairs saved...

    TNX!

  8. scvinodkumar
    Member
    Posted 2 years ago #

    @crashD i too have the same problem, now it resolved. much more thanks crashD

  9. DrLightman
    Member
    Posted 2 years ago #

    I'm just posting to say thanks to who figured it out, I was having the same problem.

    It's a lame issue by the way, wouldn't be better for wp to use some more unique identifier in place of "name" ?

  10. d910qf
    Member
    Posted 2 years ago #

    I didn't have a field named "name" but there was "hour", "date" and "minute" - I assume date was the problem.

    Thank you for posting this...

  11. lupark
    Member
    Posted 1 year ago #

    thx!

  12. Markol
    Member
    Posted 1 year ago #

    Hi,

    Thanks for pointing this out. A frustrating 2 hours spent trying to fix it before I found this.

    Mark

Topic Closed

This topic has been closed to new replies.

About this Topic