Problem/Motivation

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

Steps to reproduce

  1. Enable "Admin Toolbar" and "Admin Toolbar Extra Tools" modules
  2. Clear cache
  3. Hover over the "Content" menu, and you will not see "Blocks" as a menu link, however the Files and Comments menu links are present.

Proposed resolution

Add the "Blocks" link.

CommentFileSizeAuthor
blocks-content-admin-toolbar.gif5.65 MBprashant.c
Command icon 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

Prashant.c created an issue. See original summary.

DYdave made their first commit to this issue’s fork.

dydave’s picture

Status: Active » Needs review

This 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!

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Needs review » Needs work

For 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.

dydave’s picture

Status: Needs work » Needs review

Thanks 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 types link 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!

  • japerry committed d969da4e on 3.x authored by DYdave
    Issue #3462559 by DYdave: Link to "Block" content overview page not...
japerry’s picture

Status: Needs review » Fixed

Perfect, looks good in D9, 10, and 11. Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.