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.
When deleting a node, the function modules/menu.module:menu_node_form_delete() removes a custom menu entry for the node if it exists. The problem is that it will always print a message about a removed menu item, even though nothing has been actually deleted. Suggested fix: use db_affected_rows().
Comment | File | Size | Author |
---|---|---|---|
#4 | node_delete_status.patch | 679 bytes | ax |
#2 | node_delete_menu_msg_1.patch | 582 bytes | wiz-1 |
node_delete_menu_msg.patch | 583 bytes | wiz-1 | |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedwe use && not "and".
Comment #2
wiz-1 CreditAttribution: wiz-1 commentedok I changed and to &&
Comment #3
Jose Reyero CreditAttribution: Jose Reyero commented+1 Patch looks good
Comment #4
ax CreditAttribution: ax commentedthis is annoying behaviour, indeed, especially when you mass delete nodes. you get a status message like this:
this is a) in the mayority of cases plain wrong, as no menu items got deleted, and b) misleading: you didn't want to delete menu items but nodes, did you?
we don't show status messages for other node_api delete operations (comments etc.), so i'd suggest to just ommit the menu item message. patch attached.
please consider this for 4.7, as it certainly is a usability issue. thanks!
Comment #5
m3avrck CreditAttribution: m3avrck commentedAgreed :) Code wise, makes sense to me, the message does seem a bit superflluous.
Comment #6
Dries CreditAttribution: Dries commentedRemoving the status message sounds like the best solution. I didn't expect such a status message in first place.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #8
(not verified) CreditAttribution: commented