JS error on product page (this.$root.$children[0].form.on is not a function)
-
Hi !
I was about to make a topic to ask you why images displayed by SVI don’t get the attributes they should, more precisely, Alt texts (I’m generating custom ones using the wp_get_attachment_image_attributes hook).
But then, I noticed the parent div have a “data-wcsvi” attribute, containing the correct alt texts, so it seems when everything works as expected, you’re indeed getting the images attributes.
So I checked my JS console, since it seems you read this data-wcsvi attribute with JS to populate attributes for images, right ?
And I noticed this error (I’ll give you the whole output in case it helps) :
vendor.min.js?ver=5.1.12:1 TypeError: this.$root.$children[0].form.on is not a function at a.mounted (smart-variations-images-public.min.js?ver=5.1.12:1:10721) at Vt (vendor.min.js?ver=5.1.12:1:11408) at rn (vendor.min.js?ver=5.1.12:1:25328) at Object.insert (vendor.min.js?ver=5.1.12:1:20364) at x (vendor.min.js?ver=5.1.12:1:56175) at fo.nodeOps [as __patch__] (vendor.min.js?ver=5.1.12:1:57533) at t._update (vendor.min.js?ver=5.1.12:1:33783) at kn.r (vendor.min.js?ver=5.1.12:1:64369) at mn.get (vendor.min.js?ver=5.1.12:1:26754) at new mn (vendor.min.js?ver=5.1.12:1:26672)
Would you have any idea why this happens ?
I gave you a “nowprocket” link so that no additionnal minifying / optimization is applied on JS files, and no dependencies get deferred, but no luck, the problem is still there.Thanks !
The page I need help with: [log in to see the link]
- The topic ‘JS error on product page (this.$root.$children[0].form.on is not a function)’ is closed to new replies.