3

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?

2

vendor/magento/module-customer/view/adminhtml/ui_component open customer_address_form.xml and remove below code from line number.194

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

Remove the above code from the file.

| improve this answer | |
  • Yes, it's work. But how to do this not in this vendor? – David Young Jan 10 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. – Vikas kalal Jan 10 at 15:38
0

You can also try this solution In This File.

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']));
| improve this answer | |
0

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)

| improve this answer | |

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.