Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
+++ b/core/modules/menu_ui/menu_ui.module
@@ -548,18 +408,24 @@ function menu_ui_form_node_form_alter(&$form, $form_state) {
+ // Have to tack this onto the node so we can save it later when we have a
+ // a node ID for any new node.
+ $node->menu = $definition;
Although $node->menu is a preexisting condition of HEAD, can we open an issue and add an @todo here to remove that? In D8, we shouldn't be adding arbitrary non-field properties to content entities.
Proposed resolution
Create a menu link field and kill this whole set of code?
Or figure out some way core supports arbitrary data properly?
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedComment #2
BerdirCleaned up as part of #2406103: Remove hook_node_validate() and hook_node_submit() because they bypass the entity API.