Magento – Magento 2 Recaptcha Uncaught TypeError: Cannot read property ‘nodeName’ of undefined

magento2.3.2recaptcha

I recently updated from Magento 2.3.1 to 2.3.2. I now get the below error on every page. It worked fine on 2.3.1. I have checked to make sure the API website key and secret keys are correct. I have switched to the Luma theme and the error still shows. This is a core module and nobody has ever touched the code. I have done the normal clear cache, compile, upgrade, and removed the static and generated folders but the error still persists.

Uncaught TypeError: Cannot read property 'nodeName' of undefined
at acceptData (jquery.js:3762)
at internalData (jquery.js:3830)
at Function._data (jquery.js:4040)
at UiClass.initCaptcha (reCaptcha.js:161)
at reCaptcha.js:196
at dispatch (jquery.js:5226)
at elemData.handle (jquery.js:4878)
at Object.trigger (jquery.js:5130)
at Object.jQuery.event.trigger (jquery-migrate.js:633)
at jquery.js:5860

Best Answer

For anyone else who runs into this issue when you upgrade. 2.3.2 adds new fields for the recaptcha and enables all of them. When I disabled the newsletter recaptcha this error was cleared from the console.

Related Topic