contact-form icon indicating copy to clipboard operation
contact-form copied to clipboard

404 Error

Open dveraldi opened this issue 3 years ago • 3 comments

Description

Contact form for Craft CMS site (up to date) is giving 404 error when submitted. Original developer has no clear solution upon review.

Steps to reproduce

  1. go to https://tedwardwines.com/contact
  2. fill out form and click send message

Additional info

  • Craft version: Craft Pro 3.6.6
  • PHP version: 7.4.7 --
  • Database driver & version: MySQL 8.0.20
  • Plugins & versions: Contact Form 2.2.7

dveraldi avatar Feb 23 '21 17:02 dveraldi

@dveraldi : The redirect path doesn't seem to work. Do you get the notification when the form is submitted (/does the actual form work)? And have you tried turning on dev-mode and see whether you get an error?

MvBeurden avatar May 16 '21 20:05 MvBeurden

@dveraldi: While I was using the hidden input as contactForm/sendMessage, I also experienced 404 errors.

<input type="hidden" name="action" value="contactForm/sendMessage">

Changing it to contact-form/send solved the issue for me. It might also work for you.

<input type="hidden" name="action" value="contact-form/send">

itsdwizzy avatar Jul 31 '21 10:07 itsdwizzy

@MvBeurden @itsdwizzy The docs detail {{ actionInput('contact-form/send') }} so I'm guessing it would be similar syntax using a hidden field (as @itsdwizzy has pointed out)

jamiematrix avatar Aug 04 '21 09:08 jamiematrix

If you’re using the plugin’s built-in controller action, the value should be: contact-form/send. contactForm/sendMessage is what you would use with a Craft 2 version of this plugin.

If you have your own plugin to handle the send, please remember to use the kebab-case.

I hope this helps!

i-just avatar Jan 20 '23 10:01 i-just