0

I recenly have had the following JS error start to appear on every page on my Magento website:

TypeError: registry is undefined - Line 5557:9

Has anyone else experienced this issue before and know how to resolve it?

4
  • Do you have jQuery on your page?
    – MW Millar
    Oct 14, 2015 at 10:00
  • Yes. I have also applied the noConflict() function to prevent it conflicting with prototype. Oct 14, 2015 at 15:43
  • This SO answer should help you out stackoverflow.com/questions/4433460/… it looks like there is an event listener that is attempting to attach to an object that doesnt exist Oct 20, 2015 at 23:21
  • That's exactly what it was! Thanks for your help. Feb 5, 2016 at 10:15

1 Answer 1

0

An prototype event listener was attempting to attach to an object that didn't exist. When this listener was removed the error was resolved. See Geek Num 88 comments above.

In my example an element with the id of 'contactForm' did not exist. This meant that the error was caused because the browser could not find an element with the ID specified. See line of code causing the problem below:

var contactForm = new VarienForm('contactForm', true); 
4
  • hello @Ryan , how did you solved it. I am getting the same error in the checkout page, and my steps are not expanding. Mar 9, 2016 at 11:45
  • hello @KishorePatra, I've edited my answer above. Hope that helps. Mar 10, 2016 at 16:55
  • Hi @Ryan, I have checked the "ids" and it is all correct in the forms of the checkout page. Next, I just replaced $$ to $K in some of my files (method.phtml, shipping.phtml,available.phtml), and the steps are now expanding. but "registry" error is still coming...So will create any problem ? Mar 11, 2016 at 5:37
  • somewhere in your code prototype is trying to attach an event listener to an element with a specific ID that doesn't exist. In my example an element with an id of 'contactForm' did not exist which was triggering the registry error. Mar 11, 2016 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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