I have selected Allow Countries as Saudi and one another as you can see in below screenshot https://prnt.sc/qjyde9

the issue is that while edit customer record it's showing the different countries as selected from the dropdown in admin general settings.you can check the selected country list in above screenshot. here is showing a different countries. https://prnt.sc/qjyg3f

3 Answers 3


In This vendor/magento/module-ui/Component/Form/Element/AbstractOptionsField.php

Line no. 73

From :-

$config['options'] = array_values(array_replace_recursive($config['options'], $options));

To :-

$config['options'] = array_values(array_replace_recursive($options,$config['options']));
  • 1
    Thanks for helping it worked for me. Jan 6, 2020 at 12:08

This solution is also worked for me

Please open the below path file.


open customer_address_form.xml and remove below code from line number.194

           <options class="Magento\Directory\Model\ResourceModel\Country\Collection"/>

Remove the above code from the file and move this file to a local folder like below.


After remove that you will see your selected country into customer address edit in M2


It's a bug in Magento https://github.com/magento/magento2/issues/25218 Please go there and show support for it being fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.