
I have exact same errors on any page. Magento version 2.1.4 and earlier.
@snez Workaround found here http://magento.stackexchange.com/questions/125034/js-errors-magento-2
seems to work.
I am using magento version 2.1.6 and also getting the same error.
Hi, @snez. Thanks for reporting this issue. We've created internal ticket MAGETWO-70389 to address this issue.
For what it is worth, I think I have tracked this down as the route cause (a long with https://github.com/magento/magento2/issues/6983) for some issues around gift message fields in basket not loading as the jQuery has an error. This doesn't explain why other elements do work - but fixing this solved the issue after a considerable amount of time looking in to it.
I am also having this issue, does anyone know of a work around? Thanks.
Still present in 2.1.8; https://github.com/magento/magento2/blob/2.1.8/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js
Appears fixed (or at least changed) in 2.2RC; https://github.com/magento/magento2/blob/2.2.0-rc3.0/app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js#L23
@snez, thank you for your report.
The issue is already fixed in develop branch, 2.2.0
I started having 'autocomplete' of undefined exact same as @snez described when I was asked to by my team to remove shopping cart icon completely so I did in my custom theme I added:
<referenceBlock name="top.links">
<referenceBlock name="minicart" remove="true" />
</referenceBlock>
Didn't see the undefined until I had to look at the chrome console for debugs I got a surprise and spend a few hours trying to figure it out what was causing the issue then gotcha! now I am just using css to display:none .
ref: Magento 2.1.7
https://magento.stackexchange.com/questions/125034/js-errors-magento-2
This will work
Copy file from
vendor/magento/module-customer/view/frontend/web/js/view/authentication-popup.js
to
app/design/frontend/
and replace the below code
from
autocomplete: window.checkout.autocomplete
to
autocomplete: ((window.checkout && window.checkout.autocomplete) ? window.checkout.autocomplete : null),
Line No : 26
Please run bin/magento setup:static-content:deploy command.
Hope this will work for you
In addition to the update from @aimscoder, I had to include the following in the same file.
login: function (formUiElement, event) {
var loginData = {},
formElement = $(event.currentTarget),
formDataArray = formElement.serializeArray();
becomes
login: function (formUiElement, event) {
if(!event){
event = window.event;
}
var loginData = {},
formElement = $(event.currentTarget),
formDataArray = formElement.serializeArray();