Closed andrew-ebsco closed 5 years ago
Thanks for reporting this issue @andrew-ebsco! We're going to test this issue internally, and if it's reproducible we'll get a fix out shortly.
Hey @andrew-ebsco, we've created a PR with a fix for this issue here: https://github.com/taxjar/taxjar-magento2-extension/pull/67
Thanks for your help in reporting and fixing this!
Fixed in #67
Thanks for the update!
Hello TaxJar!
When Magento 2 is set to production mode, the TaxJar address validation mixins are still deployed in
setup:static-content:deploy
, even if address validation is not enabled. As a result, on the customer account edit address page (customer/address/edit
), thetaxjar/module-taxjar/view/base/web/js/address_validation.js
is loaded on the page. Since the element#tj-suggested-addresses
is not in the DOM because address validation is disabled, the mixin causes an error. The error prevents the normal Magento validation from being enabled and the required fields in the form are allowed to be submitted even if they are empty.I was able to resolve the issue by creating my own mixin that overrides the TaxJar behavior by first checking if
#tj-suggested-addresses
exists in the DOM.Here are our relevant specs in case you need it:
Let me know if I can provide any more information.
Thanks!