Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292305

Deleted menus are still referenced as available menus on content types and cause an error when content is edited

$
0
0

Problem/Motivation

When a menu is deleted, which was previously referenced in a node types' available menu settings, an error is thrown and "parent item" select field contains invalid options.

Issue is still present in 8.2, 8.3., 8.5.4

To reproduce

Required modules: menu_ui, node

  1. Create a menu.
  2. Create, then edit a node type. In Menu Settings -> Available menus. Select the previously created menu. (Figure)
  3. Save the node type.
  4. Delete the previously created menu. (Figure)
  5. Create or edit a node entity, with the previous node type.
  6. The following issues arise:

An error is thrown on a node entity edit form:

Notice: Undefined index: MENUNAME in menu_ui_form_node_form_alter() (line 279 of core/modules/menu_ui/menu_ui.module).

And invalid parent item select options:

Invalid  select field

Proposed resolution

Add soft dependency from menu configs to node type.

Remaining tasks

Patch, tests.

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 292305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>