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
Logged in with a administrator account if you create a webform, with no elements added to it, and you go directly to the view instead of saving,
it returns: "Unable to display this webform. Please contact the site administrator"
Steps to reproduce
1) Create a webform, give it a title.
2) With no elements added to it, go to the "View" tab.
Proposed resolution
Change the message to: " This webform has no elements added to it".
Adding screenshots to illustrate.
Comment | File | Size | Author |
---|---|---|---|
contact admin message.png | 21.03 KB | Johnny Santos | |
empty with no elements.png | 37.77 KB | Johnny Santos |
Issue fork webform-3280954
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
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedOnly users that can update the webform should see the new message.
Comment #3
Johnny Santos CreditAttribution: Johnny Santos at CI&T commentedGood point,
Im going to to try make the changes.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #6
Johnny Santos CreditAttribution: Johnny Santos at CI&T commentedComment #7
Johnny Santos CreditAttribution: Johnny Santos at CI&T commentedComment #8
cesarfilho CreditAttribution: cesarfilho commentedComment #9
cesarfilho CreditAttribution: cesarfilho at CI&T commentedThe "Contact the administrator" message problem is fixed, I tested and everything is fine, but when I ran the phpcs it showed some erros, I'm uploading a file with the erros output.
Comment #10
cesarfilho CreditAttribution: cesarfilho at CI&T commentedIn my previous comment I thought that the erros were related to the new code, but the new code is all fine, it works perfetcly and is out of errors.
Comment #12
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented