Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region is being overridden when changing from a required-state country to one that is not required #10317

Closed
nei opened this issue Jul 25, 2017 · 5 comments
Assignees
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@nei
Copy link

nei commented Jul 25, 2017

On Magento 2.1.7 the user change the country from EUA with region Alaska to Uruguay for instance the region dropdown is hidden and the region input text is showed with Alaska as value..

So, if you change to XXX and save Magento is still posting the region_id Alaska and on the backend we are now checking if the region_id exists and if it does we override the value of region.

This behavior was introduced on this commit 7750415#diff-9fadca60a49535a2817d9fc5c4535d3a

My solution was to disable the region_id dropdown element so it will not be posted when it is hide.

Preconditions

  1. Magento 2.1.7
  2. PHP 7.0.4

Steps to reproduce

  1. Log into your Account on the frontend
  2. Edit your billing address and save using EUA for country and pick a state, save it.
  3. Edit your billing address again, change from EUA to Uruguay, change the region input for Test
  4. Save it and you will see EUA state still being showed.

Expected result

  1. After save you should be able to see the new state being displayed

Actual result

  1. After save it is showing the old state value.

Proposal Solution

Not post region_id if we don't need it.

region-updater.patch.txt

@magento-engcom-team magento-engcom-team added G1 Passed bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

@nei, thank you for your report.
We've created internal ticket(s) MAGETWO-75591 to track progress on the issue.

@magento-engcom-team magento-engcom-team added Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Sep 20, 2017
@romainruaud
Copy link
Contributor

I'm working on it #SQUASHTOBERFEST

okorshenko pushed a commit that referenced this issue Oct 6, 2017
… region optional country. #11254

 - Merge Pull Request #11254 from romainruaud/magento2:fix_region-updater
 - Merged commits:
   1. 43cfc74
okorshenko pushed a commit that referenced this issue Oct 6, 2017
@magento-engcom-team
Copy link
Contributor

Hi @nei the issue has been fixed in 2.2.1 (#11254) and will be available soon

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 6, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-81019

@magento-team
Copy link
Contributor

Hi @nei. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1282 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants