Creating a new Webform element based on WebformCompositeBase results in a DumpException being thrown.
Uncaught PHP Exception Symfony\\Component\\Yaml\\Exception\\DumpException: "Object support when dumping a YAML file has been disabled." at /var/www/html/vendor/symfony/yaml/Inline.php line 197
I traced the issue back to modules/contrib/webform/src/Plugin/WebformElementBase.php
The getDefaultMultipleProperties() function is returning translatable objects instead of strings for some properties (multiple__add_more_button_label for example).
To work around this issue, I implemented the function in my plugin class, and casted to string.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3006005-2.patch | 957 bytes | jrockowitz |
Comments
Comment #2
jrockowitz commentedLet's see if the attached patch solve the problem.
Comment #3
john.p.baldwin.jr commentedYes, that patch resolved at least my particular situation. Thank you!
Comment #5
jrockowitz commented