Taxonomy Links Not Displayed in Toolbar

Created on 27 May 2016, about 8 years ago
Updated 30 May 2024, 26 days ago

Problem/Motivation

If you create a taxonomy and then a user who can only edit the terms of the taxonomy and use the admin toolbar, the link to edit the taxonomy is not shown anywhere. The user can edit the taxonomy, so far the rights work, but under drupal 7 the structure link in the toolbar was shown and inside the taxonomy links where shown. The taxonomy could be reached by the toolbar, this is not the case in d8.

Steps to reproduce

1)Create a new user role named "Taxonomy Editor."
2)Assign the "Tags: Edit terms" permission to this newly created role.
3)Generate a user account with the "Taxonomy Editor" role and log in using these credentials.
4)Upon login, observe that the user cannot access the taxonomy edit page from toolbar.
5)Assign an additional permission, "Access administration pages."
6)Following this update, both the structure and configuration menus become visible in the toolbar for users with the "Taxonomy Editor" role.

Proposed resolution

TBD

Remaining tasks

Agree on solution

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Toolbar 

Last updated about 10 hours ago

  • Maintained by
  • 🇫🇷France @nod_
Created by

🇩🇪Germany reptilex

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇯🇵Japan ultrabob Japan

    I'm sorry to reopen this after it has been closed for 2 years, but I do think it is still relevant.

    In my testing, the "Use the administration pages and help" permission also controls access to the configuration admin menu, whether the user has access to anything inside it or not. So if I want the user to be able to edit taxonomy terms through the admin menu, but not have a configuration menu showing all the sub-menus, but with no actual content. I can't do it because disabling "Use the administration pages and help" disabled the structure menu altogether, even while the user has permission to do things in it.

  • 🇮🇳India anweshasinha

    Hi,
    I have worked in the issue and created a patch. I have tested the patch in 10.2.x and added the following permission to allow the user access the taxonomy pages:-
    1. Tags: Edit terms (or whatever vocabulary)
    2. Access the taxonomy vocabulary overview page.

  • 🇯🇵Japan ultrabob Japan

    @anweshasinha Thank you, that is really great. I think the permission filter on the route needs to read _permission: 'access administration pages,access taxonomy overview' instead of _permission: 'access administration pages+access taxonomy overview'.

    I'm not sure this is the final solution for this issue, I would expect the Structure menu to be available, when submenus of it are available to the current user, so I wouldn't expect to have to both enable modifying taxonomies and enable accessing the taxonomy menu. Beyond that there are other aspects of the Structure menu, such as managing content types, etc. that also tie into the need for this menu item.

    With that said, your patch with the small change mentioned, solves the issue I'm having. Thanks a lot!

  • 🇮🇳India anweshasinha

    Hi @ultrabob,
    Thank you for your suggestion but if we use ',' instead of '+' in permission filter then, to enable 'Structure' link in the toolbar, we will require both the permissions 'access administration pages,access taxonomy overview'. And the user role having both the permission will only be able to access the 'Structure' link. But 'access administration pages' permission should only be given to 'Administrator' role rather than other roles. So I think , its better that we use '+' instead of ',' in the permission filter.
    Please let me know your thoughts.

  • 🇯🇵Japan ultrabob Japan

    @anweshasinha you are exactly right. I misread the change request on that option, when my initial testing didn't work as I expected. I just went back to recheck, and confirmed that it works the way your patch has it, and doesn't work with the ','.

    Sorry for the confusion.

  • Status changed to Needs work 5 months ago
  • 🇮🇳India shalini_jha

    Hi, I have been able to replicate the issues in version 11.x. When the "Use the administration pages" and "Tags: Edit terms" permissions are checked, it displays the structure and configuration. However, if the "Use the administration pages" permission is not enabled, the taxonomy overview page will not be visible from the toolbar.

    I tested it with the provided patch #12, and it works when only the "Tags: Edit terms" permission is checked. It only displays the structure menu, and once I clicked on structure, the taxonomy overview page is visible. However, even if both the "Tags: Edit terms" and "Use the administration pages" permissions are not checked, the structure menu is still displayed.

    I have included a screenshot for your reference

  • Status changed to Needs review 5 months ago
  • 🇮🇳India Sandeep_k New Delhi

    I've tested this on Drupal version- 11.x, sharing my testing results below-
    I have created one more taxonomy with "Tags", created a new user & updated the taxonomy edit permissions as mentioned. After logging in from that user the Structure option was not showing for me.
    Even after applying the patch #12 the Structure menu still not showing for me, I have unchecked the other term edit option & kept edit permission for the "Tags" only but the results are still the same for me. Not showing structure menu for that edit user. Sharing screenshot for reference-

  • Status changed to Needs work 5 months ago
  • 🇺🇸United States smustgrave

    This will need an issue summary update to use standard issue template

    Will need test coverage

  • 🇮🇳India shalini_jha

    Updated the issues summary by using standard issue template

    @Sandeep_k after applying the patch #12 you need to check one more permission "Access the taxonomy vocabulary overview page" with "Tags: Edit terms".then only structure toolbar menu will visible.

  • 🇮🇳India Sandeep_k New Delhi

    Thanks, @shalini_jha, After allying the patch #12 & clicking the "Access the taxonomy vocabulary overview page" permission Structure menu is showing now for the user.
    And, if both the "Tags: Edit terms" and "Use the administration pages" permissions are not checked, the structure menu is still displayed while the "Access the taxonomy vocabulary overview page" permission is checked, but won't be allowed to make any changes (only view access is shared)

  • 🇮🇳India djsagar

    Issue summary updated, removing tag

  • 🇨🇦Canada vincent signoret

    I apply this patch on 10.2.6 and I'm not able to see the icon.

    Here are some configurations of my .yml

      - 'access administration pages'
      - 'access content overview'
      - 'access contextual links'
      - 'access media overview'
      - 'access site in maintenance mode'
      - 'access taxonomy overview'
      - 'access toolbar'
    ....
      - 'edit terms in foundation_project_region'
      - 'edit terms in foundation_project_type'
    

    I have access to the page taxonomy overview.
    I rebuilt the permissions and cleared the cache, but I still don't have the Taxonomy link in my Toolbar.

    Has anyone been able to use this patch with the Gin theme? I wondering if this is why I can see the icon Structure to have the link for the taxo.

  • 🇮🇳India Prashant.c Dharamshala

    This problem happens on version 11.x as well.

    According to this #10 🐛 Taxonomy Links Not Displayed in Toolbar Needs work , it seems to work with the "Use the administration pages" permission from the system module. However, there's another problem: it only works when the "Authenticated user" role has this permission. If you try to give this permission to a specific role, access to taxonomy term pages doesn't work.

Production build 0.69.0 2024