verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
94 stars 72 forks source link

Incomplete Form Submissions and sending an email notification #1974

Closed kmmartinez closed 2 months ago

kmmartinez commented 2 months ago

Describe the bug

We have a multi-page form. There are several incomplete forms that are almost complete. Our client would like to send an email notification for those forms to her team. When clicking that button, it will just spin. It shows a 500 error naming Axios as the issue.

Steps to reproduce

  1. Pagination form, partially filled out
  2. In the submissions area, go to incomplete
  3. Click on the form, click send email notification Screenshot 2024-07-08 at 12 51 55 PM

Form settings

Screenshot 2024-07-08 at 12 55 23 PM Screenshot 2024-07-08 at 12 51 55 PM

Craft CMS version

4.10.4

Plugin version

2.1.20

Multi-site?

No

Additional context

No response

engram-design commented 2 months ago

Can you take a look in your /storage/logs/formie.log files, to see if there's more detail on the error?

kmmartinez commented 2 months ago

There is not. It doesn’t write anything to the log file.

On Jul 8, 2024, at 6:48 PM, Josh Crawford @.***> wrote:

Can you take a look in your /storage/logs/formie.log files, to see if there's more detail on the error?

— Reply to this email directly, view it on GitHub https://github.com/verbb/formie/issues/1974#issuecomment-2215549556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBDZYQRC4N7LKXQ4ENSAR3ZLMQLPAVCNFSM6AAAAABKRJ4AKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJVGU2DSNJVGY. You are receiving this because you authored the thread.

engram-design commented 2 months ago

Hmm, could you inspect the network request for the failed request? It should look something like the below:

CleanShot 2024-07-10 at 09 32 43@2x

I'm interesting in what the "Preview" tab shows for the request, as a 500 error would usually mean an application error - so something on my end. I've manually thrown an error on my end in that screenshot just to illustrate.

kmmartinez commented 2 months ago

Here is a screenshot. It's not super helpful, just showing that its a 500 error.

On Tue, Jul 9, 2024 at 6:34 PM Josh Crawford @.***> wrote:

Hmm, could you inspect the network request for the failed request? It should look something like the below:

@.*** (view on web) https://github.com/verbb/formie/assets/1221575/555036e2-680f-4525-9baf-5cc6a6f17ba4

I'm interesting in what the "Preview" tab shows for the request, as a 500 error would usually mean an application error - so something on my end. I've manually thrown an error on my end in that screenshot just to illustrate.

— Reply to this email directly, view it on GitHub https://github.com/verbb/formie/issues/1974#issuecomment-2218989258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIBDZYRNIKQYDVRWAGVSNNDZLRXRXAVCNFSM6AAAAABKRJ4AKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJYHE4DSMRVHA . You are receiving this because you authored the thread.Message ID: @.***>

--

Kaitlyn Martinez Associate Director of Development & Accessibility | Click Rain A people-centered digital agency 605-275-6010 | clickrain.com

[image: Click Rain] https://clickrain.com/[image: Lemonly] https://lemonly.com/[image: Stratus] https://www.trystratus.com/

engram-design commented 2 months ago

Looks like that screenshot hasn't come through sorry, might've been due to responding to this thread via email?

kmmartinez commented 2 months ago
Screenshot 2024-07-10 at 7 25 55 AM

Here you go!

engram-design commented 2 months ago

Do you have devMode enabled on this site? I've seen these generic errors come from all sorts of different places, but often show this generic message.

kmmartinez commented 2 months ago

It's a live site, so I did not have Dev Mode on. I turned it on quick and here is a more helpful error message.

Screenshot 2024-07-10 at 8 44 41 AM
engram-design commented 2 months ago

Ah, thanks for confirming that. I think the real issue here is that the submission is marked as incomplete, so typically no email notifications or integrations can be triggered on it. For the moment, I'll add support for triggering these things on incomplete submissions, but may look at adding a toggle to complete the submission first.

But again, there may be scenarios where you don't want to complete the submission and trigger an email/integration, which is where something like this manual handling comes in.

Added for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.1.20".

kmmartinez commented 2 months ago

Thank you!!

engram-design commented 2 months ago

Updated in 2.1.21