Closed (fixed)
Project:
Webform
Version:
6.3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2025 at 20:01 UTC
Updated:
8 Oct 2025 at 22:14 UTC
Jump to comment: Most recent
YAML can contain custom tags: https://symfony.com/doc/current/components/yaml.html#parsing-and-dumping...
I don't think it is useful in webform but it should not break forms.
If the webform YAML contains a custom tag, it triggers this error:
TypeError:
strlen(): Argument #1 ($string) must be of type string, Symfony\Component\Yaml\Tag\TaggedValue given
Don't enable webform_ui.
Browse to /admin/structure/webform/manage/[webform_id].
Save this YAML:
foo:
'#markup': !my_tag
foo: bar
Display the form.
The error could be handled more gracefully.
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
prudloff commentedComment #5
jrockowitz commentedTo perform element render validation, we probably need to use functional testing.
The render validation via \Drupal\Tests\webform\Kernel\WebformEntityElementsValidationTest is commented out because it stopped working as Webforms became more complex.
Comment #6
prudloff commentedI think the root cause is #3108309: Support Yaml::PARSE_CUSTOM_TAGS in \Drupal\Component\Serialization\YamlSymfony::decode. Before that, Yaml::decode() was not parsing custom tags.
Comment #8
jrockowitz commentedComment #11
abarrioI am getting this same error using this:
Even after applying patch.