This is a follow-up to #2513626: [Regression] Module permission links missing from module list page.

Problem/Motivation

The main Permissions page (/admin/people/permissions) has anchors that are intended to take you to the section of the page with the given module's permissions. For example, with the comment module, the link is /admin/people/permissions#module-comment. When you open that link, you see this:

Where is the comment module header? You have to scroll up to find it.

The variants of the Permissions page added in #3216341: Provide a module-specific permissions form and #2934995: Add a "Manage permissions" tab for each bundle that has associated permissions have the same problem.

Steps to reproduce

Go to /admin/people/permissions#module-comment. Observe that the module name 'Comment' is not visible.

Proposed resolution

Add proper named anchors above the given sections. For example, add <a id="module-comment"></a> before the section for the Comment module.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

cilefen’s picture

Issue summary: View changes
naveenvalecha’s picture

Assigned: Unassigned » naveenvalecha

picking this up

naveenvalecha’s picture

Assigned: naveenvalecha » Unassigned
Issue summary: View changes
StatusFileSize
new153.29 KB

I have tested the same on the bartik and seven theme and it is due to the overlaying the table header on the table rows.
Sceenshot attached.
Its seems CSS bug.Not found really exactly it needs changes.So unassigning from myself.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Version: 8.9.x-dev » 9.3.x-dev
Issue tags: +Bug Smash Initiative

I tested this on 9.3.x and was able to reproduce this error.

tr’s picture

Status: Active » Needs review
StatusFileSize
new694 bytes

I raised the EXACT SAME ISSUE more than 10 years ago. And my solution (with patch) was the same as in the above issue summary, "Consider putting proper named anchors above the given sections."

My trivial patch went nowhere, and the issue was derailed by people blaming overlay etc. But I've been using this patch successfully on my old D7 sites for over 10 years.

See #1129578: Overlay doesn't respect internal anchor links

Funny, but the tiny patch I provided there still works 10 years later when massaged to apply to D9. Here it is again. This patch moves the CSS id from the tr element, where it clearly has never worked in D7 D8 or D9, into an anchor tag where it works properly.

tr’s picture

StatusFileSize
new695 bytes

I missed a space, so the coding standards failed. Here's the correct patch.

quietone’s picture

Status: Needs review » Closed (cannot reproduce)
Related issues: +#3216341: Provide a module-specific permissions form

@TR, thanks for the history of the issue and the patch.

intended to make new screenshots so I tested this with Drupal 9.3.x, standard install and was pleasantly surprised that this has been fixed, although in a different way. When clicking a permissions link on the extend a new page with permissions just for that module is displayed. It is rather nice to have just the subset of permissions that the long list.

This was fixed in #3216341: Provide a module-specific permissions form, committed Sep 21 2021.

Therefore, closing as cannot reproduce.

tr’s picture

Status: Closed (cannot reproduce) » Needs review

"This was fixed ..."

Not really. That issue *added* separate module-specific pages for module permissions, but did not remove the original page that has the problem raised in this issue. And we still need the original page in core and will always need it - that's the only page where all the permissions are shown and if you don't happen to know which module provides the permissions that is where you will have to go to find the information.

Core tests still have references to the original page, see for example core/modules/system/tests/src/Functional/System/AdminTest.php

Likewise, many contributed modules have help files or README.txt files containing links to the original page, and those aren't likely to change anytime soon.

All these links to that original permissions page, whether in core or contrib or in documentation, are still valid and are still broken as described in the original post. The only thing that is "fixed" are the permissions links on the /admin/modules page, and these are not so much "fixed" as "avoided" by linking to entirely new pages with currently-unknown new problems.

Also these new module-specific pages happen to have the exact same issue, when listing permissions from multiple modules. They have the same issue because the markup was copied from the original page. A module that provides fields and content types, for example, will have to link to a module-specific page with multiple sections of permissions: one section for the module, one for "Node", one for "Field UI" etc. And once again the anchor to the section for that module will fail, even on this new page, in the manner described above. A simple example would be the taxonomy module, which provides field permissions as well as taxonomy permissions. A proper link to this new page would be /admin/people/permissions/module/taxonomy,field_ui and that doesn't scroll to the taxonomy section - it links to the top of the page instead. You could try /admin/people/permissions/module/taxonomy,field_ui#module-taxonomy or /admin/people/permissions/module/taxonomy,field_ui#module-field_ui but guess what, those anchors have the same problem we've been trying to fix for 10 years now. So brand new pages can get committed after only a few months of consideration and minimal testing, replicating known issues, but a 1-line fix to the anchors is ignored through three major versions of Drupal and 10 years of issues?

Is it really too much to ask to stop bikeshedding this and just fix the anchors?

quietone’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs issue summary update, +Needs tests

@TR, I followed the steps to reproduce the problem that are given in the Issue Summary and based my review on that. If the comment about bikeshedding is any way directed at me, then it is not warranted. There have been 3 people who commented on this issue in the 6 years of it existence. One person updated the IS, one person tried to fix it, and then I did a review.

So, to move this along, I've added steps to reproduce to the IS to make sure the the URL is entered by hand.

Tagging for Issue Summary update because the proposed resolution is to consider an option, not actually do something, and this needs remaining tasks as well. Eventually it will need updated before and after screenshots. And, of course, this will need a test as well, adding tag.

quietone’s picture

benjifisher’s picture

Title: Links to module-specific permissions do not get you where you would expect » Module anchors on Permissions pages do not get you where you would expect
Issue summary: View changes

+1 for needing an issue summary update. It talks about the links on /admin/modules and even has a screenshot from that page. That much really has been fixed by #3216341: Provide a module-specific permissions form.

OK, I will go ahead and update it, and remove the issue tag. Maybe someone else can add a screenshot, with the patch applied, to the "User interface changes" section.

I am also updating the title of this issue. I hope this makes it clearer that the anchors on the Permissions page, not the links on the Extend page, are the problem.

I agree that the main Permissions page is not going away, and that we should fix the anchors.

Yes, the pages like /admin/people/permissions/module/taxonomy,field_ui have the same problem. The good news is that fixing the main Permissions page will fix those pages as well. (Side note: as far as I know, the only way to get a link like that, other than typing it yourself, is in the confirmation message when enabling more than one module.)

If I have my way, then #2934995: Add a "Manage permissions" tab for each bundle that has associated permissions will add even more variants of the Permissions page, and the fix here will apply to those pages, too.

@TR, I understand your frustration. I have felt it, too. But try to appreciate @quietone, who spends a lot of effort working on the Bug smash initiative (among other things). One of the goals of that initiative is to identify issues like this, where a bug fix is just waiting to be committed.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.