- 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.