In the rules admin ui I have the path "admin/rules/rules/%" as well as others below that like "admin/rules/rules/%/delete" or "admin/rules/rules/%/edit/%". The problem is now that the paths "below" doesn't get the parent correctly assigned. So they loose the overall context, meaning even the administration menu point is closed - what is weird.

The problem is that "admin/rules/rules/%" gets hidden set to -1 and as a consequence the parent is set to 0 and the context is gone. Is there a cause for doing so?

I tried removing this behavior, which fixed the problem for me and i didn't note any other issues with it. Patch attached.
Note: I had the problem in d6, but I think it applies to d7 as well. The patch is for d6, but applies to d7 too.

#5 menu_parents_d7.patch904 bytesfago
Passed: 10789 passes, 0 fails, 0 exceptions
[ View ]
menu_parents_fix.patch846 bytesfago
Failed: 10684 passes, 1 fail, 0 exceptions
[ View ]


Title:Menu item looses parents when parent is hiddenMenu item looses parents when parent is a router item only

fixing title

Status:Active» Needs review

Does the issue apply all times the parent menu contains %?

Status:Needs review» Needs work

The last submitted patch failed testing.

new904 bytes
Passed: 10789 passes, 0 fails, 0 exceptions
[ View ]

ok, it's not so simple.. ;) Menu items appearing in the tree may not have callbacks as parents, as then wouldn't be displayed any more. I've updated the patch, so it allows just callbacks to have other callbacks as parents.

Updated patch for d7 attached, applies to d6 too (and fixes my problem there).

Status:Needs work» Needs review

Status:Needs review» Reviewed & tested by the community

Nice catch. These are the hardest to find, these half line fixes...

Status:Reviewed & tested by the community» Needs work

please re-roll w/ diff -up, can't readily tell what function this is affecting.

Also, I think I understand the problem, but a little further explanation would help.

Also code comment is > 80 chars.

Three things:

1. This sounds like a big edge case we're likely to break again without a test. So let's add one.
2. Unless mine eyes deceive me, that comment is wider than 80 chars.
3. The comment could also use some work. While I'm sure it's technically accurate, it doesn't tell me "why."

Title:Menu item looses parents when parent is a router item onlyMenu item loses parents when parent is a router item only

Spelling correction in issue title.