experius / Magento-2-Module-Experius-Postcode-NL

PostcodeNl Api Magento 2 Module. Available At Packagist
https://packagist.org/search/?q=experius
Open Software License 3.0
29 stars 31 forks source link

Address showing [object Object] on Checkout startup. #29

Closed mdesplenter closed 6 years ago

mdesplenter commented 6 years ago

When opening the Checkout page, the (disabled) address input field shows [object Object]. Other functionality is working like it should.

mve0991 commented 6 years ago

We run into the same problem. Any update about this issue yet?

Tomasz-Silpion commented 6 years ago

Up, otherwise I will fork this repo and fix it myself ;)

ghost commented 6 years ago

@bartlubbersen Do you have time and the opportunity to reproduce and test this and maybe provide us with a fix?

AlexNauta commented 6 years ago

Just a quick & dirty fix for now, I hope they will fix it in the future: Add this in vendor/experius/module-postcode/view/frontend/web/js/view/form/postcode.js

Between lines 175 & 176:

if (registry.get(self.parentName + '.street.0').get('value') == '[object Object] ') { this.debug('Fixing street.0 as it contains [object Object] - only a temporary fix for now'); registry.get(self.parentName + '.street.0').set('value', '').set('error', false); }

This few lines of code will just empty the street.0 formfield as soon as it has the value "[object Object] " (with the trailing space!). This works for me and my site, but i don't know if it will work for others. It does not fix the origin of the problem, it only fixes the outcome...

It seems to go wrong on line 172 with the var formData.street?

lewisvoncken commented 6 years ago

Has been solved in the following commit:

https://github.com/experius/Magento-2-Module-Experius-Postcode-NL/commit/28a0191bf4e42cce0f5d394184511afb462ca7a2