POSTing to Wordpress page template results in a 404.

I have a page template that is am using as a basic, super-simple shopping cart. At step 1, it POSTs first name, last name, email, and a hidden field (step=2). This works. Then, it asks for credit card information. You fill this out, and it gives a 404 error.

the form action="". The page is http://www.mydomain.com/checkout for the first and second steps. /checkout DOES EXIST.

Something I am doing is blowing up the URI parse inside the wp engine. I can't figure out what.

Why would a 404 error be triggered when posting to a WP page even though that page itself exists?
LVL 32
DrDamnitAsked:
Who is Participating?
 
DrDamnitConnect With a Mentor Author Commented:
Converted this to a "REAL" plugin, and everything works fine. Never did figure out why it was failing. However, the real plug-in also uses action="". So, that is not it because the URI request defaults to the current page.

It appears to remain a mystery unless you count: "code it right and don't be lazy" as the answer...
0
 
Wayne MichaelSenior Software DeveloperCommented:
when you go to the checkout is it switching to HTTPS and you don't have a certificate installed?
0
 
Jason C. LevineNo oneCommented:
Also, is there another redirect that happens from the checkout that could generate the error?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
DrDamnitAuthor Commented:
@wrmichael:

The shopping cart itself is non-https. However, the first two screens in question are https, and the certificate is valid, installed correctly, and I verified this in FF, Chrome, Safari, and IE8. It's a Godaddy Cert, and all browsers are happy.

@jason1178:

Not that I can tell, but I will look through the code once more to check. I am in the process of converting this to a true plugin to see if it resolves the issue. (Plus options forms are fun).
0
 
Jason C. LevineNo oneCommented:
>> (Plus options forms are fun)

Heh.

Something else to consider is to try and declare action="/checkout" explicitly to get the form to post to itself.  I'd also be concerned that with no action in the form tag, WordPress is trying to rewrite a permalink and choking on it.
0
 
Wayne MichaelSenior Software DeveloperCommented:
You might review the apache or web server logs to see what URL the server is responding with a 404 too.   maybe a typo in the shopping cart configuration?  



0
 
DrDamnitAuthor Commented:
Bump.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.