enter image description here

I am getting this error on all of the pages except the HOMEPAGE, i am using a custom theme whose parent theme is LUMA.

  • Check file js/custom.js in your theme. It maybe cause this problem. Some element missing or hidden cause this undefined – mrtuvn Jul 18 '17 at 0:53
  • please provide link for your site. i will check and tell – Rama Chandran M Jul 18 '17 at 20:20

In this case you will definitely accessing any node in html which is not present. so you have to place its presence check before calling it. wrap your code like following


Now question is how You can fins it it will present in above console error check ne by one lines and you will find that line definitely it will be your custom line, not magentos code.

| improve this answer | |

For any one who is looking for the solution i got this issue because i was using a element in javascript file and forgot to include .phtml file (which has that element) in layout file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.