Menu Link autocomplete widget does not honour content type available menus settings

Created on 13 May 2024, 7 months ago
Updated 3 July 2024, 6 months ago

Problem/Motivation

When adding a new menu link to a Menu, the Link autocomplete widget should not return results for nodes whose Content Type does not have that parent menu checked off under the Available Menus.

The node edit page honours the available menus for a content type, but when trying to add nodes to a menu from the menu link form the autocomplete returns 10 results encompassing all content types. This becomes unruly when more than 10 nodes have similar names with no way to filter the results.

Steps to reproduce

For a proposed Content Type of 'News': /admin/structure/types/manage/news
Edit > Menu Settings > Available Menus
- Uncheck all available menus

Add a menu link to the Main navigation: /admin/structure/menu/manage/main/add
- Start typing the title of a 'News' node in the Link autocomplete widget
- News nodes return in the autocomplete despite being unchecked in all the available menus

Proposed resolution

Have the menu link autocomplete widget only return nodes that belong to content types that have the parent menu checked off in the available menus.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
Menu systemΒ  β†’

Last updated about 20 hours ago

Created by

πŸ‡¨πŸ‡¦Canada adamhemeon

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

Comments & Activities

  • Issue created by @adamhemeon
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    This needs to be fixed on 11.x (our main development branch) first, and are then back ported as needed according to our policies. Also, 10.2 is in security mode now.

Production build 0.71.5 2024