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.
If you edit a menu item's attributes at
admin/structure/menu/item/[mlid]/edit
and save the form, the altered values are not saved to the database. The form at
node/[nid]/edit
works fine.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1200928_menu_attributes_save.diff | 547 bytes | dalin |
Comments
Comment #1
dalinI was curious about the bug so I decided to investigate. A tricky nut to crack, but obvious once I saw the offending line. The problem is the following code in menu_edit_item in modules/menu/menu.admin.inc (line 271):
Solved by adding one line of code to the form alter:
Comment #2
amateescu CreditAttribution: amateescu commentedConfirmed the bug and tested the patch. Works as advertised :)
Just to clarify, this happens when you edit an already set attribute.
Comment #3
Dave ReidCommitted #1 to Git.
http://drupalcode.org/project/menu_attributes.git/commit/5909e22
http://drupalcode.org/project/menu_attributes.git/commit/8ed9cf4