I have such a problem on Magento 2.3.3 I checked this logic on stock Magento 2.3.3 and it also appears there.

enter image description here

Choose a 2-3 allowed countries.

Then go to All Customer -> Customer Address Edit Form in Admin area.

Country dropdown is not as we expected.

If I just use 1 country none will show up if you chose more then it will just take countries from the top.

In console i don't have error's.

Anyone had this issue ad anyone solve it?

4 Answers 4


vendor/magento/module-customer/view/adminhtml/ui_component 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.

  • Yes, it's work. But how to do this not in this vendor? Jan 10, 2020 at 9:12
  • You need to override this file in app code or you can also try new code which I have given you it’s little thing and Magento will fix this issue in next version may be. And in above code we are just changing order of code even if you want to override Above any file then you can try if you have good knowledge of overriding. Jan 10, 2020 at 15:38

You can also try this solution In This File.


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']));

Try these Below steps.

  1. Select all countries as allowed in Default View.
  2. Select the Particular website view and select the required countries and save.
  3. Now you can see the countries in admin form and selected countries in frontend form

Or else you can check this link for a proper patch - https://github.com/magento/magento2/issues/25218 (I didn't check the patch)


I had a similar problem only in my case many countries were missing from the dropdown despite the correct configuration.

So I created a file app/code/[Vendor]/[Module]/view/adminhtml/ui_component/customer_address_form.xml and replaced the class for the dropdown options:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <fieldset name="general">
        <field name="country_id" component="Magento_Customer/js/form/element/country" sortOrder="90" formElement="select">
                        <options class="Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country"/>

So instead of Magento\Directory\Model\ResourceModel\Country\Collection, Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country will be used for fetching the countries. In this case I only get allowed countries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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