Problem/Motivation

Warning: Undefined array key "metadata" in Drupal\Core\Menu\MenuLinkBase->getMetaData() (Zeile 105 in /var/www/web/core/lib/Drupal/Core/Menu/MenuLinkBase.php)

The menu definition is missing “metadata” and “parent”, but the MenuLinkBase class requires these two parameters in the corresponding functions getParent() and getMetaData().

Steps to reproduce

I found this error when using contrib module menu_item_role_access which uses MenuLinkBase->getMetaData()

Proposed resolution

add "metadata" and "parent" to menu_definition

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3637468

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

sleitner created an issue. See original summary.

cilefen’s picture

Issue summary: View changes
Issue tags: +Needs steps to reproduce
sleitner’s picture

Issue summary: View changes
Issue tags: -Needs steps to reproduce
sleitner’s picture

Status: Active » Needs review
sleitner’s picture

Issue summary: View changes
sleitner’s picture

Issue summary: View changes