Problem/Motivation
When a node already has a menu link provided, and an user who doesn't have permissions to add, or edit links for that menu, edits the node and then saves it, the menu link disappears from the menu. This is not Drupal core's behavior, if an user just has permissions to edit the content of the node, but not the menu link, it should be kept.
Steps to reproduce
1. Install simple_menu_permissions.
2. Edit a node with a menu link with an user that doesn't have permissions to manage links for that menu.
3. Save the node.
4. See the menu link is no longer on the menu.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3523073_7.patch | 1013 bytes | rakesh.regar |
| #7 | after.png | 205.81 KB | rakesh.regar |
| #7 | before.png | 164.11 KB | rakesh.regar |
Issue fork simple_menu_permissions-3523073
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
juanolalla commentedComment #5
rakesh.regarComment #6
juanolalla commentedThanks @rakesh.regar, but didn't work. Same result.
These are the error messages (same as before) thrown after saving the node:
Comment #7
rakesh.regarHi @juanolalla,
I'm not sure why it's not working on your end. When I tried to replicate the issue, I encountered the same errors you mentioned. However, after applying the patch, all four errors were resolved, and the menu link remained intact after saving the node.
It's possible that something was missed during the manual patching process. To help, I’m attaching the patch file along with before-and-after screenshots for reference.
Please give it another try and let me know—I've tested it in multiple scenarios and it worked as expected.
Thanks!
Comment #8
juanolalla commentedThank you @rakesh.regar, you are right, sorry, I made a mistake while testing it. It works indeed.
Comment #10
ewout goosmannThank you @juanolalla for reporting this issue and thank you @rakesh.regar for providing a solution. I was able to reproduce the issue myself and the changes in the MR fix the issue. The MR is merged into the new 3.0.1 release.
Comment #11
ewout goosmannComment #12
ewout goosmann