- Issue created by @bart lambert
This is interesting. Is that the entirety of the error message?
Can you please walk us through the entire setup to reproduce the bug?
- π§πͺBelgium bart lambert
That's the message I get when trying to resend the confirmation mail.
I made a form to subscribe for a dinnerparty.
During the subcription they have to enter name, email, number of persons and then their choice for entree/main course and dessert.
At the end the see a resume, pimped up with some twig for error detection (comparison of number of people vs total entree/main course and dessert.At the end they have to check a GDPR box and a math-captcha and then they send the form to the site.
On receiving a confirmed entry, they get a confirmation mail with a summary of there demands and a twig calculates the price they have to pay.
On constructing the form, there has been a lot of 'trail and error' and also deleting and adding elements, division into pages ....
You can have a look here, and make a trail run if you like, I know which persons are allowed in the group some false entries can be deleted afterwards.
https://lsvo.be/Inschrijvingen/viering-jong-gepensioneerden-2022-2024 (I hope you readers don't misuse the link to much ;-) )Untill here everything works fine but when I want to resend the mail (because someone has delete the original one) I get this error.
2 screenshots added: 1 error, 1 logbook extract
Provide the complete config export YAML of the smallest form that exhibits the bug.
- π§πͺBelgium bart lambert
It only happens on this form. The others are doing just fine.
- πΊπΈUnited States bkosborne New Jersey, USA
We just got a report of this happening too. Haven't looked into it yet though.
- πΊπΈUnited States bkosborne New Jersey, USA
I was able to reproduce this on a fresh Drupal 10.1.5 install with Webform 6.2.0-rc2. If there's just one webform email handler that is disabled, then you're unable to resend the mail to any handler (including the enabled ones).
Here's the simplest webform I could create to demonstrate.
Steps to reproduce:
- Create a webform
- Add two email handlers, but disable one
- Create a submission
- Visit the "Resend" tab for the submission
- Attempt to resend to either the enabled or disabled handler
- Observe form validation error " The submitted value email in the message_handler_id element is not allowed. "
Attached is the webform to that demonstrates the issue as well.
By the way, I think in Drupal 10.1 is when this form validation message changed. It used to be something like "An illegal choice has been detected. Please contact the site administrator."
- πΊπΈUnited States bkosborne New Jersey, USA
Here's what the resend form looks like when you have a disabled handler β .
I think the problem is that the form has two separate form elements that have the same form key "message_handler_id". One is in the top section (enabled handlers), and the other(s) are in a details elements below it (disabled handlers). Drupal doesn't handle this situation well when it's trying to validate the submitted value is part of the original allowed set of radio buttons.
I was able to fix this problem in my testing by putting all the disabled handlers together with the enabled ones, so all the radio buttons are part of the same form key in the form array.
The change to group the email handlers into enabled/disabled was done in π Email Handler is not working based on conditions on Resend Page Fixed .
Maybe the solution here is to use a separate form key for the disabled handlers. But that could be tricky too because it would allow someone to select both an enabled handler and a disabled handler since it would be two independent radio fields.
Or maybe just revert π Email Handler is not working based on conditions on Resend Page Fixed for now? The person that originally made that issue never provided feedback or any response after the proposal was shown or committed, so there's a chance they aren't even using it.
- last update
over 1 year ago 536 pass - @bkosborne opened merge request.
- Status changed to Needs review
over 1 year ago 12:30am 20 October 2023 - πΊπΈUnited States bkosborne New Jersey, USA
Opened a merge request that just reverts π Email Handler is not working based on conditions on Resend Page Fixed for now
- Status changed to Fixed
over 1 year ago 9:06pm 20 October 2023 - πΊπΈUnited States jrockowitz Brooklyn, NY
I reverted π Email Handler is not working based on conditions on Resend Page Fixed .
- π§πͺBelgium bart lambert
thank you! updated to rc3 and error is gone, mails are resend without problem!!!
Automatically closed - issue fixed for 2 weeks with no activity.