Problem/Motivation
When a webform is set to Inline (reloads the current page and replaces the webform with the confirmation message)
and it is in a reference field submissions are duplicated.
I think each reference layer duplicates the response.
Webform reference on node = 2 emails
Webform reference on paragraph on node = 4 emails
This occurs when Inline (reloads the current page and replaces the webform with the confirmation message) is the confirmation mode. Changing to Message (reloads the current page/form and displays the confirmation message at the top of the page) fixed the issue for us
Steps to reproduce
Modules:
- webform 6.2.7
Webform configuration
Create webform with 1 field
- Text field
Change confirmation to Inline (reloads the current page and replaces the webform with the confirmation message)
Add message in Confirmation Message field
Add one handler
Email to the submitter
Default email settings
Content settings
Add webform reference field to basic page
Add basic page and choose the webform you created.
Receive duplicate responses
Submit the form, you will receive multiple responses.
This happens in production and in ddev locally.
Important notes:
If you have a paragraph the duplication is doubled from the reproduction steps.
If you use the test function OR visit the view tab for the form and submit from there you will NOT receive duplicates
Changing the confirmation type from INLINE to Message (reloads the current page/form and displays the confirmation message at the top of the page) also stops sending duplicates.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | ezgif-85ceac332c5a62.gif | 3.32 MB | jrockowitz |
| #20 | ezgif-874c908da5ca9.mp4-poster.jpg | 50.87 KB | jrockowitz |
| #19 | webform.webform.issue_3480655.yml | 5.06 KB | jrockowitz |
Comments
Comment #2
cilefen commentedAdd the essential steps to build a reproduction.
Comment #3
cilefen commentedI saw on Slack that this is a continuation of an older issue.
Comment #4
nicxvan commentedYeah sorry I created this at the end of my day so I wouldn't forget.
Comment #5
nicxvan commentedComment #6
cilefen commentedAre the
webform_protected_downloadsand PDF intrinsic to the bug reproduction, or can we leave them out of this?Comment #7
nicxvan commentedGreat point! I just tested with much simpler reproduction steps.
Comment #8
nicxvan commentedParagraphs is not needed either.
Comment #9
nicxvan commentedComment #10
nicxvan commentedI think each reference layer duplicates the response.
Webform reference on node = 2 emails
Webform reference on paragraph on node = 4 emails
Comment #11
nicxvan commentedComment #12
nicxvan commentedComment #13
nicxvan commentedComment #14
lroelsI can confirm this issue is still happening and also occurs with the "Modal" setting for form confirmation.
The "Message" setting however does not have this issue.
Comment #15
lroelsAlso: I could reproduce this without any handlers added to the form.
Comment #16
kenfordesign commentedI can confirm this issue is still happening and also occurs with the "Modal" and "Inline" setting for form confirmation. The "Message" setting does not seem to have this issue.
Comment #17
gaurav.kapoor commentedThe issue still exists when using a webform as an entity reference field in a paragraph or node. Changing to "Message" from "Confirmation Type" does resolve the issue, but the issue should be fixed for all scenarios.
Comment #18
gaurav.kapoor commentedUsing AJAX also suppresses the issue, and no multiple submissions in that case as well.
Comment #19
jrockowitz commentedI can't replicate this using the attached webform references by a webform node.
Comment #20
jrockowitz commentedComment #21
jrockowitz commentedComment #22
ameymudras commentedThankyou team, for your work on this issue. I encountered a similar problem and, while reviewing this issue, was able to troubleshoot and identify the root cause. In my case, the Toolshed contrib module was responsible. I’ve submitted a patch to address the issue. https://www.drupal.org/project/toolshed/issues/3570032
It could also be caused by a different module conflicting in your case. For troubleshooting, I recommend using hook_form_id_alter() on the specific webform and logging the debug backtrace. I noticed two debug log entries for each webform; by comparing them, I was able to identify the source of the issue.

Hope it helps!