Problem/Motivation
After updating core to 10.4, the menu widget started showing "Not in menu" summary item, even though the node certainly is in the menu.

Steps to reproduce
Update core to 10.4.something.
Proposed resolution
Currently the MenuLinkWidget.php includes its own version (library menu_link.form) of the JS for adding the summary (The menu item title, or the "Not in menu" text), most likely due to the field name being different than in core. The core library from Menu UI is drupal.menu_ui.
On the MenuLinkWidget.php, both of the libraries mentioned above are added to the elements. To my understanding, as menu_link is providing its own library with the same functionalities, the core library is unnecessary here. And for one reason or another, after the core update, it's being triggered after the menu_link's library.
The solution would be to remove the core's library from being included.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3511945-8.patch | 950 bytes | vuil |
| #2 | menu_link-dont-attach-core-library-3511945-1.patch | 950 bytes | isampo |
Issue fork menu_link-3511945
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:
- 3511945-not-in-menu
changes, plain diff MR !14
Comments
Comment #2
isampo commentedAttached is a patch for removing the core's library attaching, and only using the menu_link provided library instead.
Comment #3
divyansh.gupta commentedWorking on it.
Comment #4
merilainen commentedLooks good and tested.
Comment #6
divyansh.gupta commentedLooks good to me also, since patches are deprecated providing with and MR.
Comment #7
vuilComment #8
vuilRerolling the patch.
Comment #11
vuil