Problem/Motivation

After updating from core 11.3 to 11.4, radix fails the schema validation for the dropdown-menu component, causing a fatal PHP error.

Steps to reproduce

Display a page which has a nav component, such as a menu bar, which uses the dropdown-menu component. Observe the fatal crash.

Proposed resolution

The schema for the dropdown-menu component declares nav_utility_classes and nav_link_utility_classes as arrays. Since these are not initialized when the dropdown-menu component is included from the nav component, it fails validation.

Since these classes are not actually used in the dropdown-menu, the easiest solution is just to remove these two parameters from the dropdown-menu component's yaml schema.

CommentFileSizeAuthor
#2 dropdown-menu-schema._3609155-2.patch934 bytesdanchadwick

Issue fork radix-3609155

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

danchadwick created an issue. See original summary.

danchadwick’s picture

Status: Active » Needs review
StatusFileSize
new934 bytes

Sorry for the lack of a MR; a patch was the best I could offer at the moment.

danchadwick’s picture

Priority: Critical » Normal

Dropping priority to normal since this validation is not performed in production.

yan’s picture

I can confirm that the patch from #2 solves the problem for me.

doxigo’s picture

Status: Needs review » Fixed

Thanks danchadwick, confirmed and fixed in 6.0.x.

Closing the MR since it needed a rebase. Committed the same removal plus alignment, which is also never read by dropdown-menu.twig, and added only to the recursive include so this cannot come back. dropdown_menu_utility_classes is now passed explicitly there so nested submenus keep their classes.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • doxigo committed d210fb59 on 6.0.x
    Issue #3609155 by danchadwick: Remove unused props from dropdown-menu...

Status: Fixed » Closed (fixed)

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