Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status label is wrong in admin #9566

Closed
darkogoles1 opened this issue May 9, 2017 · 5 comments
Closed

Status label is wrong in admin #9566

darkogoles1 opened this issue May 9, 2017 · 5 comments
Assignees
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@darkogoles1
Copy link

darkogoles1 commented May 9, 2017

Preconditions

  1. Magento version 2.1.3, 2.1.6

Steps to reproduce

  1. Create Order status labels for default frontend store: http://collabshot.com/show/MVB4Tl
  2. Original status labels (for admin store should be in this table: http://collabshot.com/show/21mPgT

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:

  1. Create order
  2. Open edit order page in admin and note "Order Status"
  3. Go to Admin: Stores>Settings>Order Status and edit row with status that has order
  4. Change label for Default Store View = "Processing on store view"
  5. Refresh order edit form

Expected result

Status = "Processing"

Actual result

Status = "Processing on store view"

@magento-engcom-team magento-engcom-team added G1 Passed bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team self-assigned this Sep 28, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Sep 28, 2017
@magento-engcom-team
Copy link
Contributor

We updated description:

Best way to reproduce:

  1. Create order
  2. Open edit order page in admin and note "Order Status"
  3. Go to Admin: Stores>Settings>Order Status and edit row with status that has order
  4. Change label for Default Store View = "Processing on store view"
  5. Refresh order edit form

Expected result

Status = "Processing"

Actual result

Status = "Processing on store view"

@magento-engcom-team
Copy link
Contributor

@darkogoles1, thank you for your report.
We've created internal ticket(s) MAGETWO-80333 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Sep 28, 2017
okorshenko pushed a commit that referenced this issue Nov 1, 2017


 - Merge Pull Request #11397 from michielgerritsen/magento2:9566_show_correct_admin_label
 - Merged commits:
   1. 9ee464c
   2. 8e843ad
   3. 69ef9da
   4. 4660956
   5. 567b331
   6. 1ad99bc
   7. 0784f58
@okorshenko
Copy link
Contributor

The issue has been fixed and delivered to 2.2-develop branch. Will be available with 2.2.2 release

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Nov 1, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-81786

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 30, 2018
@magento-engcom-team
Copy link
Contributor

Hi @darkogoles1. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1285 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants