- Issue created by @huzooka
- Merge request !634Issue #3526756: Exception thrown when trying to submit element / wrapper attributes with invalid string β (Open) created by huzooka
- ππΊHungary huzooka Hungary ππΊπͺπΊ
CS and Eslint violations are preexisting imho.
Asking for a (quick) review and about further tasks. - ππΊHungary huzooka Hungary ππΊπͺπΊ
I also created a patch which can be applied on Webform 6.2.9; uploading it here if anyone is interested.
- π΅πΉPortugal dxvargas
I have tested the patch and it fixes the problem for malformed YAML (e.g. "this: is: invalid: YAML").
This part is good.When testing I've initially filled the field "Wrapper custom attributes (YAML)" with just a dummy string "BLABLABLA".
For this, the patch is not working. There is an error that is only visible in the browser's console:TypeError: Unsupported operand types: array + string in Drupal\\webform\\Element\\WebformElementAttributes::validateWebformElementAttributes() (line 185 of modules/contrib/webform/src/Element/WebformElementAttributes.php). call_user_func_array(Array, Array) (Line: 281
Can we make this dummy proof and also display an error when a random string is filled in these fields?
- π΅πΉPortugal dxvargas
It works flawless! Code and tests are good.
I mark the issue as RTBC. - π¨π¦Canada Liam Morland Ontario, CA π¨π¦
liam morland β made their first commit to this issueβs fork.
- Issue was unassigned.
- Status changed to RTBC
about 1 month ago 11:25pm 20 August 2025 - First commit to issue fork.
- πΊπΈUnited States jrockowitz Brooklyn, NY
I appreciate all the work everyone has done to resolve this issue.
The codemirror element validates the YAML and sets an error on the attributes. Still, the problem was that the decoding in WebformElementAttributes was not checking if the attributes element had any validation errors.
Please review the new MR.
- Merge request !683Issue #3526756: Exception thrown when trying to submit element / wrapper... β (Merged) created by jrockowitz
-
jrockowitz β
committed 7766de1b on 6.3.x
Issue #3526756 by huzooka, liam morland, jrockowitz, dxvargas: Exception...
-
jrockowitz β
committed 7766de1b on 6.3.x
- πΊπΈUnited States jrockowitz Brooklyn, NY
Committing my change which has test coverage and fixes the issue.
-
jrockowitz β
committed 7766de1b on 6.x
Issue #3526756 by huzooka, liam morland, jrockowitz, dxvargas: Exception...
-
jrockowitz β
committed 7766de1b on 6.x
Automatically closed - issue fixed for 2 weeks with no activity.