It was fixed before in #2239833: Regression: Menu contextual links no longer visible in menu blocks, but it regressed again, despite having test coverage. Somehow it only regressed when blocks are cached.

Please credit olli, who did all the work, I only did a reroll and then moved it into this issue rather than reopening the original issue.

(See #14 and later in #2239833: Regression: Menu contextual links no longer visible in menu blocks.)

CommentFileSizeAuthor
#1 2379083-1.patch2.05 KBWim Leers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Status: Active » Reviewed & tested by the community
FileSize
2.05 KB
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed a1a08fe and pushed to 8.0.x. Thanks!

  • alexpott committed a1a08fe on 8.0.x
    Issue #2379083 by olli, Wim Leers: Regression (again): Menu contextual...
yoroy’s picture

Status: Fixed » Active

I don't see any other link besides 'Configure block' on my menu block. Caching on or off doesn't seem to matter.

Wim Leers’s picture

Just to make sure: please clear your caches, try in incognito mode, or try in a different browser. This could be a browser caching problem.

yoroy’s picture

Checked in another browser, situation is as described in #4.

Edit: I do see the 'edit menu' link for the core 'Tools' block, but not for my own, newly created menu.

olli’s picture

@yoroy you are right.

+++ b/core/modules/menu_ui/menu_ui.module
@@ -120,7 +120,7 @@ function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginIn
   // Add contextual links for system menu blocks.
   $menus = menu_list_system_menus();
   $menu_name = $block->getDerivativeId();
-  if (isset($menus[$menu_name]) && isset($build['content'])) {
+  if (isset($menus[$menu_name])) {
     $build['#contextual_links']['menu'] = array(

That menu_list_system_menus() returns only system-defined (default) menus.

Could you open a new issue?

yoroy’s picture

yoroy’s picture

Back to fixed for this one then.

Status: Fixed » Closed (fixed)

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