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

Unable to reset password if customer has address from not allowed country #18170

Closed
ihor-sviziev opened this issue Sep 21, 2018 · 5 comments
Closed
Assignees
Labels
Component: Customer 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.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

@ihor-sviziev
Copy link
Contributor

Preconditions

  1. Magento 2.2.5

Steps to reproduce

  1. Create customer on frontend, add some customer address with Germany (just an example) and log out
  2. Go to Admin >> Stores >> Configuration >> General >> General
  3. In Country Options >> Allow Countries deselect Germany (mark as not allowed), click to Save Config (probably flushing cache also required)
  4. On frontend got to "Forgot password" form and try to reset password for customer that you created in step 1

Expected result

  1. Customer should get reset password link without any issues

Actual result

  1. Customer get's the error "We're unable to send the password reset email."
    image
  2. In logs we have
[2018-09-21 06:09:22] main.CRITICAL: Exception message: Invalid value of "GB" provided for the countryId field.
Trace: #0 /path_to_magento/magento2/vendor/magento/module-customer/Model/ResourceModel/CustomerRepository.php(266): Magento\Customer\Model\ResourceModel\AddressRepository->save(Object(Magento\Customer\Model\Data\Address))
#1 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Model\ResourceModel\CustomerRepository->save(Object(Magento\Customer\Model\Data\Customer), NULL)
#2 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor->___callParent('save', Array)
#3 /path_to_magento/magento2/vendor/magento/module-customer/Model/Plugin/CustomerRepository/TransactionWrapper.php(44): Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Customer\Model\Data\Customer), NULL)
#4 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Customer\Model\Plugin\CustomerRepository\TransactionWrapper->aroundSave(Object(Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor), Object(Closure), Object(Magento\Customer\Model\Data\Customer))
#5 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Customer\Model\Data\Customer))
#6 /path_to_magento/magento2/generated/code/Magento/Customer/Model/ResourceModel/CustomerRepository/Interceptor.php(26): Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor->___callPlugins('save', Array, Array)
#7 /path_to_magento/magento2/vendor/magento/module-customer/Model/AccountManagement.php(1284): Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor->save(Object(Magento\Customer\Model\Data\Customer))
#8 /path_to_magento/magento2/generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php(271): Magento\Customer\Model\AccountManagement->changeResetPasswordLinkToken(Object(Magento\Customer\Model\Data\Customer), 'e53fc7d535673c8...')
#9 /path_to_magento/magento2/vendor/magento/module-customer/Model/AccountManagement.php(567): Magento\Customer\Model\AccountManagement\Interceptor->changeResetPasswordLinkToken(Object(Magento\Customer\Model\Data\Customer), 'e53fc7d535673c8...')
#10 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Model\AccountManagement->initiatePasswordReset('ihor@example.com', 'email_reset', '4')
#11 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Model\AccountManagement\Interceptor->___callParent('initiatePasswor...', Array)
#12 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Model\AccountManagement\Interceptor->Magento\Framework\Interception\{closure}('ihor@example.com', 'email_reset')
#13 /path_to_magento/magento2/generated/code/Magento/Customer/Model/AccountManagement/Interceptor.php(91): Magento\Customer\Model\AccountManagement\Interceptor->___callPlugins('initiatePasswor...', Array, Array)
#14 /path_to_magento/magento2/vendor/magento/module-customer/Controller/Account/ForgotPasswordPost.php(76): Magento\Customer\Model\AccountManagement\Interceptor->initiatePasswordReset('ihor@example.com', 'email_reset')
#15 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Customer\Controller\Account\ForgotPasswordPost->execute()
#16 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->___callParent('execute', Array)
#17 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->Magento\Framework\Interception\{closure}()
#18 /path_to_magento/magento2/generated/code/Magento/Customer/Controller/Account/ForgotPasswordPost/Interceptor.php(26): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->___callPlugins('execute', Array, Array)
#19 /path_to_magento/magento2/vendor/magento/framework/App/Action/Action.php(107): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->execute()
#20 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->___callParent('dispatch', Array)
#22 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#23 /path_to_magento/magento2/generated/code/Magento/Customer/Controller/Account/ForgotPasswordPost/Interceptor.php(39): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->___callPlugins('dispatch', Array, Array)
#24 /path_to_magento/magento2/vendor/magento/framework/App/FrontController.php(55): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#26 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#27 /path_to_magento/magento2/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 /path_to_magento/magento2/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /path_to_magento/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#32 /path_to_magento/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#33 /path_to_magento/magento2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /path_to_magento/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#35 /path_to_magento/magento2/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#36 /path_to_magento/magento2/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#37 {main} [] []
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. 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-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@ihor-sviziev do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 21, 2018
@ghost ghost self-assigned this Sep 21, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Sep 21, 2018

Hi @engcom-backlog-nazar. 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: 👇

  • 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 G1 Passed will be added to the issue automatically. Please, edit issue description if needed, until label G1 Passed appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add G2 Passed 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label acknowledged once verification is complete.

  • 7. Make sure that automatic system confirms that report is acknowledged.

@ghost ghost added 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 Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Component: Customer Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Sep 21, 2018
@magento-engcom-team
Copy link
Contributor

@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-95165, MAGETWO-95166 were created

@ghost ghost removed their assignment Sep 21, 2018
@dmytro-ch dmytro-ch self-assigned this Sep 21, 2018
dmytro-ch added a commit to dmytro-ch/magento2 that referenced this issue Sep 22, 2018
dmytro-ch added a commit to dmytro-ch/magento2 that referenced this issue Sep 26, 2018
dmytro-ch added a commit to dmytro-ch/magento2 that referenced this issue Nov 26, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Dec 21, 2018
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your report.
The issue has been fixed in #19964 by @dmytro-ch in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Customer 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.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

3 participants