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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | dropdown-menu-schema._3609155-2.patch | 934 bytes | danchadwick |
Issue fork radix-3609155
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:
- 3609155-dropdown-menu-component-has
compare
- 6.0.x
changes, plain diff MR !177
Comments
Comment #2
danchadwick commentedSorry for the lack of a MR; a patch was the best I could offer at the moment.
Comment #3
danchadwick commentedDropping priority to normal since this validation is not performed in production.
Comment #5
yan commentedI can confirm that the patch from #2 solves the problem for me.
Comment #6
doxigo commentedThanks 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 bydropdown-menu.twig, and addedonlyto the recursive include so this cannot come back.dropdown_menu_utility_classesis now passed explicitly there so nested submenus keep their classes.