Race condition when creating menu links and editing content deletes menu links

Created on 29 June 2021, almost 3 years ago
Updated 20 November 2023, 7 months ago

Problem/Motivation

In a site where there are several editors working, some menu links are disappearing, breaking the menu tree. It happens when a menu link is edited, referencing a node while the node is currently edited at the same time.

Steps to reproduce

  • Have menu ui module installed.
  • One user is editing a node with the 'Provide a menu link' option disabled.
  • Another user is editing a menu link, setting the node created by the first user as the link, as a reference.
  • The first user saves the page. As the 'Provide a menu link' option was disabled because there was no menu link related with the node, the menu link is removed, by the menu ui form submit

Plus, this video also shows how to reproduce the problem: https://www.drupal.org/files/issues/2023-11-06/drupal-core-3221319-menu-links-race-condition.mp4 β†’

Proposed resolution

  • Do not remove a menu item when the 'Provide a menu link' option is unchecked but the menu link related to the node is created after the user started editing the page.
  • Display a warning to let the user know that the menu item could not be deleted
  • Remaining tasks

    User interface changes

    New error message

    API changes

    NA

    Data model changes

    NA

    Release notes snippet

    NA

    πŸ› Bug report
    Status

    Needs work

    Version

    11.0 πŸ”₯

    Component
    Menu UIΒ  β†’

    Last updated about 14 hours ago

    No maintainer
    Created by

    πŸ‡ͺπŸ‡ΈSpain omarlopesino

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

    Merge Requests

    Comments & Activities

    Not all content is available!

    It's likely this issue predates Contrib.social: some issue and comment data are missing.

    Production build 0.69.0 2024