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

Admin Global Search was build in a hurry #7698

Closed
tzyganu opened this issue Dec 6, 2016 · 4 comments
Closed

Admin Global Search was build in a hurry #7698

tzyganu opened this issue Dec 6, 2016 · 4 comments
Assignees
Labels
bug report Component: Search Component: Translation Fixed in 2.2.x The issue has been fixed in 2.2 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

@tzyganu
Copy link
Contributor

tzyganu commented Dec 6, 2016

The admin global search is not entirely translatable, extensible and does not take into account the ACL settings for the current user

Preconditions

Installed Version: 2.2.0-dev

Steps to reproduce

  1. Install any other language pack
  2. Create an admin role that does not have access to orders and an admin user assigned to that role
  3. Login as the user created in the step above
  4. Search for something in the admin global search.

Expected result

  1. I should see the links to " keywords in Products", " keywords in Customers", " keywords in Pages" only and translated in the selected language.
  2. I should see results for products, pages and customers matching my keywords (this actually works).

Actual result

  1. I see the link "keywords in Orders" that I should not see because I don't have access to orders. Clicking it takes me to an "Access denied" page.
  2. The texts "in products", "in pages"... are not translated
    image

Additional information.

The actual results explained above happen because the template that displays the global search results contains the hardcoded values for the links to pages, customers, products and orders. (lines 30 to 41) and the texts "in products", "in pages" don't go through the translation function __.

Additional issues related to the global search.

The global search is partially extensible (without changing the template that renders the results).
I can add my own entity that can be searchable in the global search but I cannot add a link. For example if I have an entity called "Article", I can make the instances searchable but I cannot get a link saying "keywords in Articles" without changing the template.

Suggestion to make it extensible and to avoid ACL related issues.

The links "keywords in ..." should come from the di.xml file and have the ACL for those links checked before displaying the links. Similar to how the actual entity search works.

@oleg-onufer
Copy link
Contributor

Thank you, Internal ticket was created for this issue - MAGETWO-70026

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jun 21, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 9, 2017
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team magento-engcom-team added 2.1.x 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 Oct 11, 2017
@RomaKis RomaKis self-assigned this Jan 5, 2018
@RomaKis
Copy link
Contributor

RomaKis commented Jan 5, 2018

Working on this.

@okorshenko
Copy link
Contributor

Hi @tzyganu. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1167 by @RomaKis in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.4 release.

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Search Component: Translation Fixed in 2.2.x The issue has been fixed in 2.2 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