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.

"Not in menu" text on the menu widget summary

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.

Issue fork menu_link-3511945

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

isampo created an issue. See original summary.

isampo’s picture

Attached is a patch for removing the core's library attaching, and only using the menu_link provided library instead.

divyansh.gupta’s picture

Assigned: Unassigned » divyansh.gupta

Working on it.

merilainen’s picture

Status: Active » Reviewed & tested by the community

Looks good and tested.

divyansh.gupta’s picture

Assigned: divyansh.gupta » Unassigned

Looks good to me also, since patches are deprecated providing with and MR.

vuil’s picture

vuil’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new950 bytes

Rerolling the patch.

  • vuil committed 50712b08 on 2.0.x
    Issue #3511945 by divyansh.gupta, vuil, isampo, merilainen: "Not in menu...

vuil’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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