We discovered an intermittent issue with our forms that have known visitor. When a user submits the form as a known visitor sometimes it appends an extra /confirmation-page to the end of the confirmation url thus creating a 404 error
Form for testing:
https://calendly.com/landing/form
Thanks in advance!
Solved! Go to Solution.
This is happening because your code has a bug that causes the visitor to be redirected
This logic, packaged in this file, runs on the confirmation page as well as on the form page:
if (isKnownVisitor) {
window.localStorage.setItem('firstName', knownFirstName);
navigate(`thank-you?firstName=${knownFirstName}`);
} else {
window.localStorage.setItem('firstName', values.FirstName);
navigate(`thank-you?firstName=${values.FirstName}`);
}
If you look in Dev Tools » Network you can see there are two pages loaded in quick succession after a form submit. The second is the 404, /thank-you/thank-you.
Can you first check in the form settings to make sure you don’t have Advanced Thank You choices?
Hi @SanfordWhiteman - no there are no advanced thank you settings configured. Thank you is configured as "stay on page"
Wait, you don't mean the literal values /page-name or /confirmation-page, right?
You mean it repeats the path of the confirmation page, whatever that is - so it should be /mythankyou but instead it's /mythankyou/mythankyou, if it’s supposed to be /otherthankyou it becomes /otherthankyou/otherthankyou, etc.
This is happening because your code has a bug that causes the visitor to be redirected
This logic, packaged in this file, runs on the confirmation page as well as on the form page:
if (isKnownVisitor) {
window.localStorage.setItem('firstName', knownFirstName);
navigate(`thank-you?firstName=${knownFirstName}`);
} else {
window.localStorage.setItem('firstName', values.FirstName);
navigate(`thank-you?firstName=${values.FirstName}`);
}
If you look in Dev Tools » Network you can see there are two pages loaded in quick succession after a form submit. The second is the 404, /thank-you/thank-you.