Problem/Motivation
The navigation module defines a set of derivative block plugins for each of the defined menus on your Drupal site. These blocks are meant to be used exclusively within the Navigation and not meant to be generally usable as blocks in the rest of your site. However, at present, b/c these are defined as block derivatives, they are leaking into the Block layout UI:

Steps to reproduce
- Install Drupal core standard profile on latest 11.x
- Enable navigation module
- Browse to Structure > Block layout
- Click "Place block"
- Scroll the list and notice there are blocks listed in the "Menus (Navigation)" category
Proposed resolution
Update code to exclude all navigation_menu block plugin derivatives.
Remaining tasks
Patch
User interface changes
All navigation-specific blocks should be hidden from the Block layout UI
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | after_nav.png | 89.53 KB | atul_ghate |
| #8 | before_nav.png | 274.08 KB | atul_ghate |
| Monosnap Block layout | Drush Site-Install 2024-11-20 15-57-10.png | 1.02 MB | m4olivei |
Issue fork drupal-3488768
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:
- 3488768-menu-blocks-specific
changes, plain diff MR !10328
Comments
Comment #2
quietone commentedChanges are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.
Comment #3
niharika.s commentedComment #4
niharika.s commentedComment #7
plopescMR created including basic test coverage.
Comment #8
atul_ghate commentedI've successfully reproduced the issue and reviewed the Merge Request !10338 on the 11.x branch. I also applied the patch without any problems, and the pipeline is passing. changing status to RTBC. (please see attached screenshot)
Comment #10
catchCommitted/pushed to 11.x and cherry-picked to 11.1.x, thanks!
This doesn't apply cleanly to 10.5.x due to the OOP hooks merge. I think getting navigation to stable in 11.1/11.2 is more important than backporting to 10.x, so I'm going to mark this fixed, however if someone wants to backport it to 10.5/10.4, please re-open with a backport MR.