1

Right after applying the SUPEE-9767 patch on our Magento 1.9.0.1 site, every time when I try to put a product to cart by clicking the Add to cart button on the product page, I get the following errors (partavaahto.html is the product url):

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Mage is undefined

partavaahto.html (line 40, col 1)

TypeError: Translate is not a constructor

partavaahto.html (line 52, col 26)

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Product is undefined

partavaahto.html (line 221, col 9)

ReferenceError: VarienForm is not defined

partavaahto.html (line 347, col 17)

TypeError: Mage is undefined

partavaahto.html (line 431, col 9)

TypeError: element.dispatchEvent is not a function

bf802dc...e879.js (line 5734, col 7) 4

detailed error: TypeError: productAddToCartForm is undefined

Strangely, on the category listing page Add to cart button still works fine.

I have applied all the previous security patches and they have worked without errors.

Any idea what could cause this and how could it be fixed?

1

According to the following js file name: bf802dc...e879.js it seems like you have merged and minified js/css files enabled.

Depending if it's done via the Magento out of the box or via an extension. In both cases I suggest you refresh the cache that generates those JS/CSS files as it could be the reason why you're getting JS errors

  • I checked from the Magento backend settings (System > Configuration > Advanced > Developer > JavaScript Settings) and found out that the setting for merging JavaScript files was indeed set to Yes. So I set it to No and then flushed all cache from Cache Management (Flush Cache Storage) and now the Add to cart button works again on the product page. Thank you very much for your quick reply! – M.Burton Jun 13 '17 at 7:58

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.