AJAX not working on menu item edit form

Created on 26 February 2025, 3 months ago

When editing a menu item through the menu item edit form (route menu_ui.link_edit, path /admin/structure/menu/link/{menu_link_plugin}/edit) the AJAX doesn't work when changing the parent.

It happens that there are multiple issues involved.

Here's how I solved it:

  1. There was an issue with the javascript, which is solved by using this patch: https://www.drupal.org/project/menu_link_weight/issues/3456674#comment-1... 🐛 JavaScript error when adding a menu link and the node title field is not presented in the edit form Active
  2. This then lead to a core issue, which can be solved by using this Drupal core patch: https://www.drupal.org/project/drupal/issues/2898335#comment-16004249 🐛 Using AJAX in menu link's edit form causes database connection serialization errors Needs review
  3. Finally, the code responsible to return the updated siblings also had an issue, for which I provide a patch in this issue
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium ludo.r Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024