Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When you add a new Handler, but don't want to use it yet and set it to Disabled and add a conditional logic, the logic is not being saved and no alert or message is being shown.
Steps to reproduce
Add a new Handler, set it to disabled, add conditional logic, save. Open the conditional logic and you will see that it is not saved.
Proposed resolution
Add a message when the Handler is disabled that the conditional logics are not being saved or save them when Handler is disabled.
Comment | File | Size | Author |
---|---|---|---|
#7 | 3274742-test.gif | 4.56 MB | bruno.bicudo |
#6 | 3274742-6.patch | 1.96 KB | jrockowitz |
#4 | 3274742-test.gif | 530.67 KB | bruno.bicudo |
#3 | 3274742-3.patch | 822 bytes | hmendes |
Issue fork webform-3274742
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
delev CreditAttribution: delev commentedComment #3
hmendes CreditAttribution: hmendes at CI&T commentedCreated a patch to display a warning message when editing the conditions of a handler that is disabled.
I'm not too familiar with Webform, so idk if this was the best approach. Any suggestions on how to do it in a different way or also to change the message, is welcome.
If someone wants to know, the place where it erases the conditions if the handler is disabled is on the submitForm method of WebformHandlerFormbase.php.
Comment #4
bruno.bicudoSilly me, i sent the same gif 2 times because i thought it failed due to bad internet connection.
I reproduced the issue, reviewed and tested #3 and it works as described. Gif file(s) show how the message displays on the test.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI am able to reproduce this issue and when a handler is disabled its conditional logic is deleted.
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #7
bruno.bicudoI reviewed and tested #6 and it works well for me. Gif shows the tests with bot an enabled handler and another disabled one. I also change them both from enabled to disabled on the test.
Everything seems fine, so changing to RTBC.
Comment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented