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.55k stars 9.32k forks source link

Street lines ignoring blank lines #27847

Closed r-martins closed 4 months ago

r-martins commented 4 years ago

Preconditions (*)

  1. Magento Open Source 2.3.4 to 2.4.1
  2. Configure Customer street lines to 3 or more lines
  3. No additional module or configuration is required

Steps to reproduce (*)

  1. Go to Customer configuration in admin, and set the number of street lines to 3 or more (customer/address/street_lines)
  2. In the frontend, proceed to checkout and add a new address. When adding a new address in the checkout, leave blank street lines in the middle. I.e: Populate line 1 with Line 1 string, and line 3 with Line 3 string.
  3. After the order is placed and the address is saved, try to edit this address or see this address in the database (table customer_address_entity).

Expected result (*)

  1. It's expected to see the line 1 and 3 populated in the frontend when going to customer's adress book (/customer/address).
  2. It's expected to see the value Line 1⏎⏎Line 3 in the database

Actual result (*)

  1. The value we inserted in the address line 3 is displayed as line 2 when editing the address
  2. In customer_address_entity.street column we see Line 1⏎Line 3.

Note that doesn't happen if you manually insert the address in customer area (instead of inserting it during the checkout).

Screenshot_14_04_20_09_32 magento2playground____www_magento2playground__-_magento2playground_customer_address_entity__magento2playground_localhost_ Edit_Address

issue-27847

Additional Information

Quote from https://github.com/magento/magento2/issues/27847#issuecomment-625012111

I don't remember problems in the frontend, except when editing the address. The main problem is that it breaks integrations that relies on the correct line. For instance, we use line 4 as Neighborhood in many stores in Brazil, but we faced integration issues when it's saved in line 3. It also breaks payments integrations(and payment methods) that requires neighborhood for placing an order. In those cases, registered customers can't place an order with an existing address. These are just a few cases.

m2-assistant[bot] commented 4 years ago

Hi @r-martins. 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.

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


r-martins commented 4 years ago

@magento give me 2.4-develop instance

magento-engcom-team commented 4 years ago

Hi @r-martins. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team commented 4 years ago

Hi @r-martins, here is your Magento instance. Admin access: https://i-27847-2-4-develop.instances.magento-community.engineering/admin_cf28 Login: 215c7447 Password: b4652bc4c4cc Instance will be terminated in up to 3 hours.

r-martins commented 4 years ago

@magento give me 2.3.4 instance

magento-engcom-team commented 4 years ago

Hi @r-martins. Thank you for your request. I'm working on Magento 2.3.4 instance for you

magento-engcom-team commented 4 years ago

Hi @r-martins, here is your Magento instance. Admin access: https://i-27847-2-3-4.instances.magento-community.engineering/admin_e1fa Login: f8da86f9 Password: 8287f1b7f570 Instance will be terminated in up to 3 hours.

r-martins commented 4 years ago

I could reproduce the error both in 2.3.4 and 2.4-develop instances when adding address in checkout process. Edit_Address

m2-assistant[bot] commented 4 years ago

Hi @krishprakash. 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:

magento-engcom-team commented 4 years ago

:white_check_mark: Confirmed by @krishprakash Thank you for verifying the issue. Based on the provided information internal tickets MC-33344 were created

Issue Available: @krishprakash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

krishprakash commented 4 years ago

Reproduced on latest instance:

image

m2-assistant[bot] commented 4 years ago

Hi @tna274. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


sdzhepa commented 4 years ago

Hello @r-martins

I can confirm that

  1. If Customer create new address during checkout = Steet Line 3 will be saved into address line 2
  2. But if create new address from My account = line 2 will not be replaced

Could you please provide any examples/scenarios when it brakes user flow on Storefront or creates any difficulties during development, etc?

Or the issue only about inconsistency in these cases?

r-martins commented 4 years ago

Hello @sdzhepa . I don't remember problems in the frontend, except when editing the address. The main problem is that it breaks integrations that relies on the correct line. For instance, we use line 4 as Neighborhood in many stores in Brazil, but we faced integration issues when it's saved in line 3. It also breaks payments integrations(and payment methods) that requires neighborhood for placing an order. In those cases, registered customers can't place an order with an existing address. These are just a few cases.

r-martins commented 3 years ago

I was able to test the Pull Request #28126 on Magento 2.4.1 and it seems it does fix this issue. I hope someone from Magento could notice the importance of this issue.

r-martins commented 2 years ago

🎂 Happy birthday to this old and persistent bug! I hope someone takes care of you one day.

ZIPITRO commented 2 years ago

Anyone can move this issue to the drawing table please?

engcom-Bravo commented 4 months ago

Hi @r-martins,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is no more reproducible.Kindly refer the attached video.

https://github.com/magento/magento2/assets/51680745/03cc4911-b116-42fe-b271-9efdc4e1a296

We are able to to see the line 1 and 3 populated in the frontend when going to customer's adress book

Hence we are closing this issue.

Thanks.