Settings is not a valid render array in navigation module

Created on 1 April 2025, 2 days ago

Problem/Motivation

Having both core Navigation module and contrib Modifiers β†’ module enabled causes an error.

The change in πŸ› Custom Navigation logo is disconnected from new Layout template Fixed introduced a 'settings' array without a preceding '#'. When the Modifiers module attempts to process this array in a template_preprocess_layout() function it causes an error in Element::children() as settings is not a valid render array.

Steps to reproduce

  1. Enable Modifiers module
  2. Enable Navigation module
  3. Observe error: InvalidArgumentException: "hide_logo" is an invalid render array key. Value should be an array but got a boolean. in Drupal\Core\Render\Element::children() (line 102 of core/lib/Drupal/Core/Render/Element.php).

Proposed resolution

I think the output of doBuildNavigation() should be a valid render array so properties such as 'settings' should have a '#' to indicate they are not intended to be rendered directly.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

navigation.module

Created by

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