Problem/Motivation

When editing the form YAML source on the "Build" tab, invalid YAML may result in an InvalidArgumentException. For example, if one pastes the output of the "Export" tab instead of the source tab of another form, the error may be:

InvalidArgumentException: "uuid" is an invalid render array key. Value should be an array but got a string. in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).

Proposed resolution

Use a try-catch block and set an error on the form component.

Remaining tasks

Implement.

User interface changes

Error message instead of exception for invalid YAML.

API changes

None.

Data model changes

None.

Issue fork webform-3586789

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:

Comments

liam morland created an issue. See original summary.

liam morland’s picture

Assigned: liam morland » Unassigned
Status: Active » Needs review

.