- πΊπΈUnited States cboyden
I have a use case for showing the taxonomy overview page to users who can't create or edit terms.
On a site with a controlled vocabulary, it will likely require more privileges to update the vocabulary than to tag content with that vocabulary. For example, Content Editors would be able to tag their content with existing terms, but only administrators would be able to add, edit, or rearrange terms.
As a Content Editor on this site, how would you understand the structure of the vocabulary so you can use it correctly? The two interfaces for tagging (autocomplete and select list / checkbox) don't do a good job of showing you a big, strucured vocabulary. It would be useful to be able to see the overview page.
Also, this permissions setup still produces invalid table markup.
To reproduce this issue:
- Install the latest Drupal 11.x branch with the standard profile, which will use the Claro admin theme.
- Log in as an administrator.
- Change the Content Editor role permissions:
- Remove Create terms and Edit terms in the Tags vocab.
- Add Access taxonomy overview.
- Save permissions.
- Create 5 to 10 terms in the Tags vocab and arrange them with three or more levels of depth.
- View the Tags overview page.
- Note the appearance of the drag handles, the Status column, and the Operations column.
- Note that depth is shown by indenting. (BTW this is an accessibility issue.)
- Press the Show row weights button.
- Note the Weight column is shown and the drag handles are hidden. Terms are still indented to show depth.
- Create a user with the Content Editor role.
- Log in as the Content Editor.
- View the Tags overview page.
- Note there is no "Show row weights" button, and both the Operations and Weight columns are empty.
- Note the following display issues:
- Drag handle images are displayed, but they are unstyled and don't do anything.
- Items deeper than second level show multiple drag handles.
- Row hover highlight doesn't extend to Weight column.
- There is no indenting for depth.
- Note the following invalid markup:
- The header row has 4 cells, but each data row only has 3 cells.
This seems more like a bug than a feature request. The system shouldn't produce invalid markup just because of some less-common combination of permissions.
One thing that's happening is that the tabledrag CSS and JS is not being added to the overview page when there is no edit terms permission. That makes sense from a permissions perspective, but because those assets are what control display of the drag handles and the weight column, we end up with this broken display.
The initial approach might be to fix what's broken, and then discuss whether to try hiding the Operations column if it's empty. Is there something we can borrow from the Views hide empty column feature?
If this approach sounds good then I will update the issue summary.
- πΊπΈUnited States cboyden
After doing some more searching of the issue queue, it looks like π Taxonomy Term List page is broken when users don't have permission to edit/create terms Active is a better place to discuss the issues with the permission combination.