Problem/Motivation

When editing a node that has a menu link that has been disabled, saving the node re-enables that menu link.

I've confirmed by manually testing that this did not happen in Drupal 7, thus marking this as a regression.

Steps to reproduce

  1. Add a node, checking the provide a menu link, and add the link to the main menu
  2. Edit the main menu and disable the new menu link
  3. Edit the node, change nothing, and just hit 'Save'
  4. Note that the previously disabled menu link is now enabled

Proposed resolution

Write tests and fix the issue.

Remaining tasks

User interface changes

API changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because Drupal has unexpected behaviour
Issue priority Major because Drupal has behaviour that is unexpected, affects everyone, but has a manual workaround.
Prioritized changes Bugs are prioritized. The main goal of this issue is usability. If you disable a menu item you want it to stay unchanged, if you don't touch any menu settings. For example if you just edit the body.
Disruption This is not expected to be disruptive to core or contrib. The solution is tiny and effective.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

This test illustrates the issue, and the fix is quite simple (I've also confirmed the fix via manual testing).

The last submitted patch, 1: menu-ui-node-edit-re-enables-link-2495407-01-TEST-ONLY.patch, failed testing.

cilefen’s picture

Priority: Normal » Major

I am pretty sure this should be major because although not disastrous, it affects all Drupal users in an unexpected way.

Noe_’s picture

Status: Needs review » Reviewed & tested by the community

I followed the instructions and I can confirm the problem exists.

Then I applied the patch and the problem doesn't exist anymore.

The code looks clean and according to coding standards to me.

When I apply just the test and run it, it fails.
When I apply the entire patch if succeeds.

So it looks RTBC to me.

Noe_’s picture

Issue summary: View changes
Noe_’s picture

Issue summary: View changes
Noe_’s picture

Issue summary: View changes
cilefen’s picture

Issue summary: View changes
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Ha! Nice catch.

Committed and pushed to 8.0.x. Thanks!

  • webchick committed abfdc5e on 8.0.x
    Issue #2495407 by jhedstrom, Noe_, cilefen: Regression: Editing a node...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.