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.

CommentFileSizeAuthor
#2 3006005-2.patch957 bytesjrockowitz

Comments

john.p.baldwin.jr created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new957 bytes

Let's see if the attached patch solve the problem.

john.p.baldwin.jr’s picture

Yes, that patch resolved at least my particular situation. Thank you!

  • jrockowitz committed c446b3d on 8.x-5.x
    Issue #3006005 by jrockowitz: Custom WebformComposite element throws...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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