magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.31k forks source link

Shipping address renderer is not loading customAttributes in Magento EE 2.3.4 #26740

Closed noeli-eshopguru closed 4 years ago

noeli-eshopguru commented 4 years ago

Preconditions (*)

  1. Magento EE 2.3.4
  2. Checkout

Steps to reproduce (*)

  1. Add a product to cart as logged in customer with the default shipping & billing address.
  2. Go to checkout.
  3. Move to the payment step and try to select the payment methods.
  4. Come back to the shipping step.
  5. Move to the payment step again.

Expected result (*)

  1. You can select the payment methods without any error.
  2. You have to go to the payment step without any error.

Actual result (*)

  1. You can't select any payment method.
  2. You can't go to the payment step again
  3. You will see knockout js errors on the browser console. image

You can't do any action because of those errors. Magento EE 2.3.4 added a new function getCustomAttributeLabel for shipping address, shipping information and billing address templates. But this function is occurring error. For example, /Magento_Checkout/js/view/shipping-address/address-renderer/default.js line:68 image this.source.get('customAttributes') is undefined. I know Magento EE 2.3.4 has vendor/magento/module-customer-custom-attributes module. Is this error related to this module?

m2-assistant[bot] commented 4 years ago

Hi @noeli-eshopguru. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@noeli-eshopguru do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 4 years ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 4 years ago

Hello @noeli-eshopguru

Thank you for your report

We are not able to reproduce this on 2.4-develop instance with a custom Product attribute, and with an added Customer attribute customer_attribute

Tried with several payment methods payment_method

Can you please help us to resolve this issue by answering the following questions:

Thank you in advance

noeli-eshopguru commented 4 years ago

Hi @engcom-Bravo

Thanks.

darinda commented 4 years ago

I can confirm that problem, we have it too after upgrading from v2.3.3 to v2.3.4. The problem can indeed be tracked down to the method mentioned by @noeli-eshopguru, the getCustomAttributeLabel method that was introduced by https://github.com/magento/magento2/commit/22c4ee1413212f4b55cff5014d48966c26582fe5.

In our case we're talking about a custom attribute added to quote_address and order_address entities, respectively.

The new input field is added to the billing address using (a therefore slightly modified version) of the official documentation.

xmav commented 4 years ago

Appears to be fixed in https://github.com/magento/magento2/commit/4ef5d3939ee7498f1d0af1257b603e55fb5ff162

darinda commented 4 years ago

@xmav, confirmed. Thank you, the problem is fixed by the mentioned commit. Of course it just reverses https://github.com/magento/magento2/commit/4ef5d3939ee7498f1d0af1257b603e55fb5ff162 so the original problem comes back, but i don't care for my project.

engcom-Bravo commented 4 years ago

@noeli-eshopguru

The issue is fixed on Magento 2.4-develop with the commit mentioned above https://github.com/magento/magento2/commit/4ef5d3939ee7498f1d0af1257b603e55fb5ff162

So we have to close this issue If you'll ever face any issues with Magento, please feel free to create new ticket according to the Issue reporting guidelines

Thank you for collaboration

noeli-eshopguru commented 4 years ago

@engcom-Bravo Yes, right. Thanks for your help.

mts527 commented 4 years ago

On EE 2.3.4. we also needed to extend js/view/checkout/shipping-information/address-renderer/shipping.js from the Temando Shipping module by adding getCustomAttributeLabel method which was missing (same way as applied in the commit 4ef5d39).