Hi,
I have a test site where I am running the profile wizard. On my test site I have a customised version of the "Navigation" menu - I added some extra menu items to point at some page nodes. When I try to generate a .profile of this site none of my menu items get inserted into the .profile file. I only have the following lines that relate to menus:
// Primary links
install_menu_create_menu_items(array (),2);
// Other menus
install_menu_create_menu_items(array (),0);
I don't have any primary links configured, so that's not an issue. The nodes themselves, along with their URL aliases, are successfully put into the profile file though.
Could someone have a look at this issue for me? I can send you a dump of my menu table if that would help.
Cheers,
Stella
Comments
Comment #1
tonyp001 commentedI'm having a similar issue:
I created a custom menu and organized some menu items underneath it. When I ran the profile installation, it created the menu and menu items, but it didn't place the menu items underneath my menu.
Any help would be appreciated.
Comment #2
alex_b commentedI found two problems with recursive menu creation in crud.inc:
1) install_menu_create_menu_items() tests for $items['children'] but then iterates through $item['children']
2) install_menu_get_mid($path) can return undefined values if there is more than one menu item with the same path - this leads typically to a bunch of menu items associated with a parent that they shouldn't be associated with.
The attached patch contains a fix that takes the following approach:
1) install_menu_create_menu_items() expects children on $item and hands the children down to the next stage of recursion without any further iteration. I guess everything depends here on the format that install_menu_create_menu_items() expects. This is the function I use for _exporting_ a menu:
2) install_menu_create_menu_item() returns $menu['mid'] rather than install_menu_get_mid($path) - this makes sure that the correct menu id is used as parent id.
Comment #3
boris mann commentedMenu stuff is, I believe completely different in 6.x. And PW is deprecated.