Menu block with static menu links

Created on 18 September 2017, almost 7 years ago
Updated 26 October 2023, 11 months ago

Hi,

If you attempt to create a custom menu links in custom module and render it in menu block with initial level option set to 2 or more, the block not render.

I've made this menu in custom module :

myproject_user.profile:
  title: 'Mon profil'
  menu_name: myproject-user
  class: Drupal\myproject_user\Plugin\Menu\ProfileMenuLink
  expanded: 1
  weight: 0
myproject_user.profile.profile:
  title: 'Mon profil'
  parent: myproject_user.profile
  menu_name: myproject-user
  class: Drupal\myproject_user\Plugin\Menu\ProfileProfileMenuLink
  expanded: 1
  weight: 0
myproject_user.orders:
  title: 'Mes commandes'
  menu_name: myproject-user
  class: Drupal\myproject_user\Plugin\Menu\OrdersMenuLink
  expanded: 1
  weight: 1
myproject_user.orders.history:
  title: 'Historique des commandes'
  parent: myproject_user.orders
  menu_name: myproject-user
  class: Drupal\myproject_user\Plugin\Menu\OrdersHistoryMenuLink
  expanded: 1
  weight: 0
myproject_user.orders.refund:
  title: 'Echanges/Rembousements'
  parent: myproject_user.orders
  menu_name: myproject-user
  class: Drupal\myproject_user\Plugin\Menu\OrdersRefundMenuLink
  expanded: 1
  weight: 1

Each link is correctly render when i'm set the initial value at 1 but not with 2 or more.

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
Menu systemΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡ͺBelgium Cybercraft2003

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    Hey @Cybercraft2003

    Is this bug still reproducible on Drupal 10.1, or 11.x? If so, are you able to provide steps to reproduce from a clean Drupal install? Reason being is in your sample custom module code you're using custom Menu plugins so we just need to rule out that those are the cause.

    Thanks!

Production build 0.71.5 2024