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
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
- Add a node, checking the provide a menu link, and add the link to the main menu
- Edit the main menu and disable the new menu link
- Edit the node, change nothing, and just hit 'Save'
- 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
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. |
Comment | File | Size | Author |
---|---|---|---|
#1 | menu-ui-node-edit-re-enables-link-2495407-01.patch | 1.74 KB | jhedstrom |
#1 | menu-ui-node-edit-re-enables-link-2495407-01-TEST-ONLY.patch | 1.09 KB | jhedstrom |
Comments
Comment #1
jhedstromThis test illustrates the issue, and the fix is quite simple (I've also confirmed the fix via manual testing).
Comment #3
cilefen CreditAttribution: cilefen commentedI am pretty sure this should be major because although not disastrous, it affects all Drupal users in an unexpected way.
Comment #4
Noe_ CreditAttribution: Noe_ at Devhouse Spindle commentedI 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.
Comment #5
Noe_ CreditAttribution: Noe_ at Devhouse Spindle commentedComment #6
Noe_ CreditAttribution: Noe_ at Devhouse Spindle commentedComment #7
Noe_ CreditAttribution: Noe_ at Devhouse Spindle commentedComment #8
cilefen CreditAttribution: cilefen commentedComment #9
webchickHa! Nice catch.
Committed and pushed to 8.0.x. Thanks!