Problem/Motivation

When editing a form without webform_uid, if the YAML input contains an invalid render array, it triggers an exception:

InvalidArgumentException:
"foo" is an invalid render array key. Value should be an array but got a object.

  at core/lib/Drupal/Core/Render/Element.php:97
  at Drupal\Core\Render\Element::children()
     (modules/contrib/webform/src/WebformEntityElementsForm.php:234)
  at Drupal\webform\WebformEntityElementsForm->addWebformTypePrefixRecursive()
     (modules/contrib/webform/src/WebformEntityElementsForm.php:216)

Steps to reproduce

Don't enable webform_ui.
Browse to /admin/structure/webform/manage/[webform_id].
Save this YAML:

foo: bar

Proposed resolution

This error should be handled more gracefully.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3547518

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

prudloff created an issue. See original summary.

prudloff’s picture

Title: InvalidArgumentException if YAML contains custom tag » InvalidArgumentException if YAML contains invalid render array
Issue summary: View changes

My bad, this is not related to to custom tags, it happens with any invalid render array.

prudloff’s picture

Issue summary: View changes

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

Status: Active » Needs review
jrockowitz’s picture

Status: Needs review » Reviewed & tested by the community

This is a fairly simple change

jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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