Hi, i added CS form with email action and redirect.
After i submit form i get redirect to page “404” with no form send?
SMTP plugin is working normally and i dont have any cache plugin installed.
Hey @Luketina,
The issue of getting redirected to a 404 page with no email sent upon form submission is typically caused by one (or both) of the following reasons:
1. Action Execution Order (Redirect Before Email)
In Cornerstone Forms, actions inside an Action Group are executed sequentially. The Redirect Action executes a PHP exit; immediately after redirecting the browser.
- The Cause: If the Redirect Action is placed above/before the Email Action in your action sequence, the script terminates immediately when redirecting, preventing the Email Action from ever running.
- The Fix: Ensure the Redirect Action is the very last action in your Action Group hierarchy.
2. WordPress Reserved Query Conflict (Form Field Names)
WordPress uses global query variables to parse URLs. If your form fields use any of these reserved words as their field names, WordPress will intercept them, try to query database posts matching that criteria, fail, and load a 404 page before the form’s processing scripts can run.
-
The Cause: Common reserved field names include:
-
name(e.g., usingnamefor a contact name instead ofyour-nameorfullname) -
m,p,w,cat,year,monthnum,day,author,attachment
-
-
The Fix: Change the field name/ID in your Form elements to something unique and safe (e.g., use
cs_nameorcustomer_nameinstead of justname).
3. Invalid or Empty Redirect URL Location
- The Cause: If the “Location” value inside your Redirect Action settings is blank, formatted incorrectly, or references a non-existent URL relative path, WordPress will redirect to a page that does not exist, triggering a 404 error.
-
The Fix: Verify that the Redirect Action’s location is set to a valid, existing URL (e.g.
/thank-you/or a full URL likehttps://example.com/success).
I set unique form field names and now is working, thanks!