Closed (fixed)
Project:
Drupal core
Version:
6.8
Component:
menu system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2008 at 13:03 UTC
Updated:
11 Aug 2014 at 05:19 UTC
Jump to comment: Most recent
Comments
Comment #1
ainigma32 commentedYes this does seem to be by design. From system.install line 868:
Maybe you could add a comment to this documentation page http://drupal.org/node/174891 ?
Does that answer your question ?
- Arie
Comment #2
frdesign commentedI added a comment as you suggested. Maybe someone can explain what would happen if this flag didn't prevent further customization of the menu link.
Thanks :-)
Freddy
Comment #3
jrockowitz commentedI did notice the hook_menu_link_alter() will execute when you add or edit a customize menu item. It just won't execute for 'customized' menu items when all the menus are rebuilt (using the Devel module).
Comment #4
ainigma32 commented@Freddy: maybe you would have better luck getting an answer on the forums, developer mailing list or IRC.
@jrockowitz: Not sure what you are saying. Could you explain using an example maybe?
- Arie
Comment #5
jrockowitz commentedhook_menu_link_alter() will only be executed when a link is saved via menu_link_save() (http://api.drupal.org/api/function/menu_link_save/6).
The issue is customized links will be not rebuilt when you access the admin module page (admin/build/modules) or use the Devel module's "Rebuild menus' link.
http://drupal.geek.nz/blog/how-rebuild-menu-drupal-6
Below is the code from the function that is causing your problem.
http://api.drupal.org/api/function/_menu_navigation_links_rebuild/6
The funny thing is, if you goto the edit link form for any menu item(admin/build/menu-customize/primary-links/edit) and click 'save', the menu_link_save() function is called and all the hook_menu_link_alter() hooks will be executed for just this single menu item.
Anyway, I know this is not the best answer.
Trying to address the original question. If you change a menu links table record from customized=1 to customized=0, and menu link was created be module, it will most likely be 'reset' to its default state the next time your menus are rebuilt. If you manually created the menu item either using 'Add item' (admin/build/menu-customize/primary-links/add) or adding the menu item from a node form then everything should be fine.
Comment #6
frdesign commentedThanks for the thorough response and insights into Drupal's inner workings. I'm new to coding and I'm just beginning to learn my way around the Drupal universe. I think this thread will be very imformative should anyone else run into this issue.
Comment #7
avpadernoComment #8
ainigma32 commentedAnswer provided so I'm setting this to fixed.
Feel free to reopen of you think that is wrong.
- Arie
Comment #10
xia325again commentedThis information do help me understand the hook_menu_link_alter(), thank you for your information, guys!