Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoupled Front-End Not Working #250

Open
mcclaskiem opened this issue Aug 22, 2023 · 0 comments
Open

Decoupled Front-End Not Working #250

mcclaskiem opened this issue Aug 22, 2023 · 0 comments
Labels

Comments

@mcclaskiem
Copy link

Description

I have a decoupled front-end built using Gatsby and would like to use this plug-in as a simple way to handle the contact form. As of now I have spent hours trying to debug this and cant seem to get anywhere. When I post the form submission from the front-end I get a 200 response back but no email is sent and nothing shows up in logs for craft side. The 200 response is shown in what I console.log in my fetch response but the "network" tab of the inspector response tab shows a preview of the homepage. I don't think that it is a CSRF issue because that usually will throw a 400 bad request error. Is there something Im missing here?

I am also using Mailgun SMTP and have successfully sent a test email from the CP.

Example POST payload:
action=contact-form%2Fsend&message%5BfromName%5D=Max&message%5BcompanyName%5D=max%40thesmithy.io&fromEmail=test%40test.com&message%5BphoneNumber%5D=1231231234&message%5Bbody%5D=test

Steps to reproduce

  1. Submit form over AJAX using fetch
  2. Observe 200 response

Additional info

  • Craft version: 3.8.1
  • PHP version: 7.4
  • Database driver & version: MySQL 8.0
  • Plugins & versions: contact-form 2.5.2
@mcclaskiem mcclaskiem added the bug label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant