-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Status label is wrong in admin #9566
Copy link
Copy link
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug report
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasebug report
Type
Fields
Give feedbackNo fields configured for issues without a type.
Preconditions
Steps to reproduce
Expected result
When an order is created in the frontend, order status should have e.g. "erp_uploaded" code.
Label in frontend should be Processing, as we added store specific label "Processing" to "sales_order_status_label" table
But label in admin store should be the original label from "sales_order_status" table, which is not the case.
Actual result
In the file: /vendor/magento/module-sales/Model/Order/Status.php:145, the method "getStoreLabel" is trying to fetch a label for current admin store, but always returns the label for "Default" frontend store (which is id=1 in my case).
The reason is because Magento is not loading ADMIN store id but always returns default store id, even inside adminhtml area:
http://collabshot.com/show/Q8KvAK
"$this->_storeManager->getStore($store);" always returns store id=1 instead of store id=0
This makes status labels usage useless either in the frontend, either in admin, this is how above sample statuses look like in admin:
So, finally, even the source model that is trying to fetch status label is showing Frontend label instead of original admin status label - all because of wrong store id (Default instead of admin) loaded in backend.
Best way to reproduce:
Expected result
Status = "Processing"
Actual result
Status = "Processing on store view"