Magento2: Shipping address renderer is not loading customAttributes in Magento EE 2.3.4

Created on 6 Feb 2020  路  10Comments  路  Source: magento/magento2

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?

Format is valid needs update Reported on 2.3.4

Most helpful comment

All 10 comments

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

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

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?

  • [ ] yes
  • [ ] no

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:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

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:

  • does this issue occur on 2.4-develop instance?
  • what kind of custom attribute are you using, if it is possible, please attach a screenshot with the attribute settings?
  • what kind of payment methods are available for your store?

Thank you in advance

Hi @engcom-Bravo

  • The issue occurred on Magento EE 2.3.4.
  • It's not for the product custom attribute. It's for the customer custom attributes from module-customer-custom-attributes. I have already showed the cases on the top. Please read again.

Thanks.

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, 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.

@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

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

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).

Was this page helpful?
0 / 5 - 0 ratings