Closed (won't fix)
Project:
Features
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Sep 2010 at 23:45 UTC
Updated:
23 Aug 2012 at 15:29 UTC
Jump to comment: Most recent file
Reproduce: Have a default menu link exported from features with a parent that is added via hook_menu (for example) and not hook_menu_default_menu_links.
Since this doesn't test if menu item is managed by a feature.
if (!empty($link['plid']) && $parent = menu_link_load($link['plid'])) {
$link['parent_path'] = $parent['link_path'];
}
When menu_links_features_rebuild_ordered is reordering, it drops the menu item as both conditions always fail.
Patch tests and lets it catch the first if statement. Later, if the menu item exists, even if not managed by features, it sets the parent as features_menu_link_load doesn't care who made the menu link :)!.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | features_910604_menu_parent_path.patch | 748 bytes | hefox |
| #2 | features.910604.patch | 740 bytes | jhedstrom |
| parent_path_fallback.patch | 916 bytes | hefox |
Comments
Comment #1
hefox commentedClarifying title
Comment #2
jhedstromThis resolves the issue for me. Re-uploading the same patch, but made with
--relative --no-prefixso it can be applied via drush make.Comment #3
hefox commentedSeems good then, marking RTBC.
(Oh damn, I've been sooo good lately about --relative --no-prefix I haven't been double checking my patches. I really need to make an alias...).
Comment #4
damienmckenna+1. This, and a few others, have resolved some crazy menu problems I was having. Thanks!
Comment #5
hefox commentedCode in d7 looks the same
d6 commit: http://drupalcode.org/project/features.git/commit/9f4c8e4
Comment #6
hefox commentedPatch applied fine, so here's one with the a/, b/ prefixes.
Comment #7
febbraro commentedComment #8
febbraro commentedI'm having difficultly testing this. Can you give me a more complete test case?
Comment #9
hefox commented1) Take a menu item that is in a menu by default, like create content (node/add) in navigation.
2) Add a menu entity under that to something else ('admin/content/node'? for example)
3) export that menu link into a feature.
4) try that feature on a new site
(I think)
Comment #10
mpotter commentedClosing this for lack of activity. I know menu links have issues, but please re-open this issue if you think this patch is still needed.