Skip to main content
Tweeted twitter.com/StackMagento/status/1179320218239344640

I am facing a problem adding customer address custom attributes, in Magento 2.2 is working fine but after upgrading to Magento 2.3 iI am receiving this error when shipping-information is saved:

ErrorAn error occurred during "shipping_address" processing. ErrorAn error occurred during "customAttributes" processing. A custom attribute is specified with a missing attribute code. Verify the code and try again.

It is happening when sending shipping information, custom attributes keys are not the custom attributes labels, so when magentoMagento validate the custmecustomer attributes it's sending the error. I dontdon't find any differentdifference in documentation from Magento 2.2 and 2.3 about adding custom attributes.

I am facing a problem adding customer address custom attributes, in Magento 2.2 is working fine but after upgrading to Magento 2.3 i am receiving this error when shipping-information is saved:

Error occurred during "shipping_address" processing. Error occurred during "customAttributes" processing. A custom attribute is specified with a missing attribute code. Verify the code and try again.

It is happening when sending shipping information, custom attributes keys are not the custom attributes labels, so when magento validate the custme attributes it's sending the error. I dont find any different in documentation from Magento 2.2 and 2.3 about adding custom attributes.

I am facing a problem adding customer address custom attributes, in Magento 2.2 is working fine but after upgrading to Magento 2.3 I am receiving this error when shipping-information is saved:

An error occurred during "shipping_address" processing. An error occurred during "customAttributes" processing. A custom attribute is specified with a missing attribute code. Verify the code and try again.

It is happening when sending shipping information, custom attributes keys are not the custom attributes labels, so when Magento validate the customer attributes it's sending the error. I don't find any difference in documentation from Magento 2.2 and 2.3 about adding custom attributes.

Source Link

Facing problem with custom attributes in customer address checkout

I am facing a problem adding customer address custom attributes, in Magento 2.2 is working fine but after upgrading to Magento 2.3 i am receiving this error when shipping-information is saved:

Error occurred during "shipping_address" processing. Error occurred during "customAttributes" processing. A custom attribute is specified with a missing attribute code. Verify the code and try again.

It is happening when sending shipping information, custom attributes keys are not the custom attributes labels, so when magento validate the custme attributes it's sending the error. I dont find any different in documentation from Magento 2.2 and 2.3 about adding custom attributes.

enter image description here

Here is an example of how I am adding custom attributes

$customFieldBetweenStreets = [ 'component' => 'Magento_Ui/js/form/element/abstract', 'config' => [ // customScope is used to group elements within a single form (e.g. they can be validated separately) 'customScope' => 'shippingAddress.custom_attributes', 'customEntry' => null, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input', 'tooltip' => [ 'description' => 'Entre calles', ], ], 'dataScope' => 'shippingAddress.custom_attributes' . '.' . $customAttributeCodeBetweenStreets, 'label' => 'Entre calles', 'provider' => 'checkoutProvider', 'sortOrder' => 122, 'validation' => [ 'required-entry' => true, 'max_text_length' => 60 ], 'options' => [], 'filterBy' => null, 'customEntry' => null, 'visible' => true, ]; 

And my set-shipping-information-mixin

return function (setShippingInformationAction) { return wrapper.wrap(setShippingInformationAction, function (originalAction, messageContainer) { var shippingAddress = quote.shippingAddress(); if (shippingAddress['extension_attributes'] === undefined) { shippingAddress['extension_attributes'] = {}; } if (shippingAddress.customAttributes != undefined) { $.each(shippingAddress.customAttributes , function( key, value ) { if($.isPlainObject(value)){ value = value['value']; } shippingAddress['customAttributes'][key] = value; shippingAddress['extension_attributes'][key] = value; }); } return originalAction(messageContainer); }); }; 

});

Here the $.each(shippingAddress.customAttributes , function( key, value ) Key is returning the 0,1,2,3 etc, index while in Magento 2.2 is the custom attribute code I am adding in my Layout Processor

Any help would be appreciated