Problem/Motivation

Cannot add a composite.

Steps to reproduce

Using almost vanilla Drupal 9.1.8 with Webform 6.0.3.
Wanted to add a new composite at /admin/structure/webform/config/composite/add
Got an error: The website encountered an unexpected error. Please try again later.
Found this message in the log:
TypeError: Argument 1 passed to Symfony\Component\Yaml\Parser::parse() must be of the type string, null given, called in /app/web/core/lib/Drupal/Component/Serialization/YamlSymfony.php on line 37 in Symfony\Component\Yaml\Parser->parse() (line 79 of /app/vendor/symfony/yaml/Parser.php)

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

mErilainen created an issue. See original summary.

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

rik_deuzeman’s picture

This error is caused by parsing elements before checking if they exists.
Patch added.

Webbeh’s picture

Status: Active » Needs review

Given #4 and the MR, this is For Review.

Webbeh’s picture

Title: Canot add a composite » Cannot create composite: parse() must be of the type string, null given
Status: Needs review » Reviewed & tested by the community

Given the ambiguous title, changing the issue to the title of the error.

Just ran into this issue, +1 to the patch in #4 an/or MR 1, so moving to RTBC.

wesleydv’s picture

Tested on Drupal 9.2.8 and Webform 6.1.0, all is still ok can be committed

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

richgerdes’s picture

Status: Reviewed & tested by the community » Fixed

Looks like some great collaboration here! Sorry I haven't gotten to committing this sooner. Thank you all for you hard work!

I've committed it and released it as part of 1.0-rc3.

Status: Fixed » Closed (fixed)

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