Problem/Motivation
Menu link to "Blocks" content overview page /admin/content/block not listed under the "Content" menu.

Steps to reproduce
- Enable "Admin Toolbar" and "Admin Toolbar Extra Tools" modules
- Clear cache
- Hover over the "Content" menu, and you will not see "
Blocks" as a menu link, however theFilesandCommentsmenu links are present.
Proposed resolution
Add the "Blocks" link.
| Comment | File | Size | Author |
|---|---|---|---|
| blocks-content-admin-toolbar.gif | 5.65 MB | prashant.c |
Issue fork admin_toolbar-3462559
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
dydave commentedThis change seems to have been introduced in 10.1.0, see issue #2862564: Move Custom block library to Content with change record: Block management pages have new paths and menu items.
At this point, merge request MR!89 doesn't take into account backward compatibility (pre-10.1.0).
If BC for versions < 10.1.0 is required, we could always keep the existing code wrapped in a statement
if (version_compare(\Drupal::VERSION, '10.1', '<')) {and the code from the MR for versions >= 10.1.0.Tests have been run locally and they would seem to still pass ✅
(with a few other patches #3407845: GitlabCI support: Add config file and fix PHPUnit tests)
Based on how the maintainers would like to approach this issue: remaining to be addressed backward compatibility and/or adding test case.
We would greatly appreciate to have your feedback and reviews on the suggested changes.
Thanks in advance!
Comment #6
japerryFor the most part, the code works in Drupal 9. The main thing missing is the link to the block type definition page, which should be easy to shim in.
Comment #7
dydave commentedThanks a lot Jakob (@japerry) for the great help on this issue and the project in general!
The changes you've suggested above at #6 have been updated in MR!89 and are ready to be reviewed:
The existing code for the
Block typeslink was kept and wrapped in a version comparison statement, which should leave this link's behavior untouched for versions below 10.1.✅ Tests still seem to be passing:
MR: https://git.drupalcode.org/issue/admin_toolbar-3462559/-/pipelines/242038
Thanks in advance for your testing, reviews and feedback!
Comment #9
japerryPerfect, looks good in D9, 10, and 11. Committed.