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.

Issue fork webform-3280954

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Johnny Santos created an issue. See original summary.

jrockowitz’s picture

Only users that can update the webform should see the new message.

Johnny Santos’s picture

Assigned: Unassigned » Johnny Santos

Good point,
Im going to to try make the changes.

jrockowitz’s picture

Status: Active » Needs review
Johnny Santos’s picture

Assigned: Johnny Santos » Unassigned
Johnny Santos’s picture

cesarfilho’s picture

Assigned: Unassigned » cesarfilho
cesarfilho’s picture

Status: Needs review » Needs work
FileSize
378.33 KB

The "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.

cesarfilho’s picture

Status: Needs work » Reviewed & tested by the community

In 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.

jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.