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

Comments

miiimooo created an issue. See original summary.

jrockowitz’s picture

Status: Needs work » Postponed (maintainer needs more info)
StatusFileSize
new4.75 KB

I am unable to replicate this issue using the attached webform.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new235.86 KB

This issue is being caused by empty image text.

jrockowitz’s picture

StatusFileSize
new6.16 KB
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

  • jrockowitz committed a43463e on 8.x-5.x
    Issue #3006845 by jrockowitz, miiimooo: Uncaught TypeError: Cannot read...

Status: Fixed » Closed (fixed)

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