Hello it seems when i add a menu link to a node, and after that i add another menu link to the same note (same menu or different menu, makes no difference) i have 2 rows for that node in the menu_node table. But then i remove one of them from the menu it the module removes all the links.

Comments

SandraVdv’s picture

I think the problem is in the menu_node_menu_link_delete() function

function menu_node_menu_link_delete($link) {
  if ($node = menu_node_get_node($link['mlid'])) {
    // TODO: If http://drupal.org/node/1012768 doesn't get in,
    // then we must attach the $link to the node and format as an
    // object, which is what our API expects.
    if (empty($node->menu_node_links)) {
      $node->menu_node_links[$link['mlid']] = (object) $link;
    }
    menu_node_record_delete($node);
  }
}

I think the mlid also needs to be passed as an argument for that function so only the menu link for the specific menu item will get deleted and NOT all links for alle menu items to that node.

agentrickard’s picture

Status: Needs work » Closed (duplicate)

See #1257254: Improper delete record when menu link delete

This module is seeking a new maintainer.