Nop 4.10 - AddressAttributeParser. ParseCustomAddressAttributes exception

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
ArgumentNullException: Value cannot be null.
Parameter name: form


Url: /checkout/billingaddress (from popup cart)

How to reproduce:

1. Logged in customer without any address
2. Billing address in checkout is disabled

CheckoutController, starting from 268 line:

var model = _checkoutModelFactory.PrepareBillingAddressModel(cart, prePopulateNewAddressWithCustomerFields: true);


Model has no inited Form property. And, below, line 281:

return NewBillingAddress(model); 


inside NewBillingAddress, line: 342 //custom address attributes
            
var customAttributes = _addressAttributeParser.ParseCustomAddressAttributes(model.Form);


And the first check:

 if (form == null)
                throw new ArgumentNullException(nameof(form));
5 years ago
Thanks! We'll investigate it - https://github.com/nopSolutions/nopCommerce/issues/3219
5 years ago
Done. Please see this commit for more details.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.