Undefined array key `menu_depth` breaks PHPUnit tests

Created on 18 August 2025, about 1 month ago

Problem/Motivation

In Drupal CMS's PHPUnit test, the latest release of sitemap has broken us due to an undefined array key (which will fail PHPUnit tests):

Exception: Warning: Undefined array key "menu_depth"
Drupal\sitemap\Plugin\Sitemap\Menu->view()() (Line: 116)

Proposed resolution

This seems like a minor oversight; probably what's needed is to ensure that menu_depth has a default value in the class's #[Sitemap] attribute.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024