
A bug in Magento in the Admin Order store selector dialog causes the language selector to reload repeatedly.
An admin user is incorrectly redirected after selecting store view while creating a new order.
Steps to reproduce
1. Install a clean instance.
2. Create a product.
3. Create an additional website, one store, and two store views.
4. Create an order from Admin by selecting store view 1.
Expected results:
The user is redirected to the order page
Actual results:
The user is not redirected to the order page after selecting the store view. Instead, the user is redirected back to the language selection page.
Two Solutions
Solution #1
1. Follow the instructions for retrieving the Magento patch here: ACSD-52277: Admin user redirected incorrectly on selecting store view when creating new order
- OR -
Solution #2
If the patch fails (like it did for me for 2.4.6-p8), you can manually override Magento_Sales/order/create/scripts.js.
1. Create the folder: app/design/adminhtml/[Vendor]/[Theme]/Magento_Sales/web/order/create/scripts.js
2. Copy the original scripts.js from: vendor/magento/module-sales/view/adminhtml/web/order/create/scripts.js
3. Paste the original scripts.js to the location: app/design/adminhtml/[Vendor]/[Theme]/Magento_Sales/web/order/create/scripts.js
Note: [Vendor]/[Theme] should be replaced with your admin theme namespace and theme name.
4. Then comment out the line:
location.reload();
in the setStoreId method.
In Magento 2.4.6, this is on line 161.
5. Clear Cache and Deploy Static Content with the following two commands:
bin/magento cache:clean
bin/magento setup:static-content:deploy -f
That's it!
You will be able to create orders in the Admin without the annoying language selector reloading loop.