This happens when I have more than one image select element in a webform.
drupal.js?v=8.6.1:13 Uncaught TypeError: Cannot read property 'replace' of undefined
at HTMLDivElement.<anonymous> (webform_image_select.element.js?v=8.6.1:73)
at Function.each (jquery.min.js?v=3.2.1:2)
at r.fn.init.each (jquery.min.js?v=3.2.1:2)
at HTMLSelectElement.<anonymous> (webform_image_select.element.js?v=8.6.1:71)
at Function.each (jquery.min.js?v=3.2.1:2)
at r.fn.init.each (jquery.min.js?v=3.2.1:2)
at Object.attach (webform_image_select.element.js?v=8.6.1:26)
at drupal.js?v=8.6.1:25
at Array.forEach (<anonymous>)
at Object.Drupal.attachBehaviors (drupal.js?v=8.6.1:22)Simple fix seems to be to disable offending piece of code. Setting this to needs work
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3006845-4.patch | 6.16 KB | jrockowitz |
| #3 | Edit image_select_01 element Webform Demo Site.png | 235.86 KB | jrockowitz |
| #2 | webform.webform.issue_3006845.yml | 4.75 KB | jrockowitz |
| webform_image_select__undefined_replace.patch | 1.12 KB | miiimooo |
Comments
Comment #2
jrockowitz commentedI am unable to replicate this issue using the attached webform.
Comment #3
jrockowitz commentedThis issue is being caused by empty image text.
Comment #4
jrockowitz commentedComment #5
jrockowitz commentedI committed the patch. Please download the latest dev release to review.