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

Issue fork drupal-3488768

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

m4olivei created an issue. See original summary.

quietone’s picture

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

Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.

niharika.s’s picture

Assigned: Unassigned » niharika.s
niharika.s’s picture

Assigned: niharika.s » Unassigned

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

plopesc’s picture

Status: Active » Needs review

MR created including basic test coverage.

atul_ghate’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new274.08 KB
new89.53 KB

I'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)

  • catch committed f341fd00 on 11.x
    Issue #3488768 by plopesc, m4olivei, atul_ghate: Menu blocks specific to...
catch’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/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.

  • catch committed 4f9ce1ec on 11.1.x
    Issue #3488768 by plopesc, m4olivei, atul_ghate: Menu blocks specific to...

Status: Fixed » Closed (fixed)

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