Closed (works as designed)
Project:
e-Commerce
Version:
master
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2005 at 03:31 UTC
Updated:
24 Apr 2005 at 05:30 UTC
The ecommerce address module has a bug in address_menu which causes the following odd behavior:
1. The "my address book" menu item does not appear in the administer -> menus listing.
2. The "my address book" menu item appears on every other page (where the user has permission to access it) and as a result of 1. cannot be disabled.
The attached patch fixes this bug (a one-byte change: if(!$may_cache) becomes if($may_cache)), and removes some nearby sloppy code (another one-liner: just removed $GLOBALS['user']->uid == $user->uid).
| Comment | File | Size | Author |
|---|---|---|---|
| address-menu-fix.patch | 716 bytes | krumms |
Comments
Comment #1
krumms commentedHmm this problem is a little thornier than I anticipated. The above patch will only fix the issue for the user who makes the change (usually the administrator).
The real problem is that this menu item cannot be a MENU_NORMAL_ITEM or a MENU_SUGGESTED_ITEM, because the fact a menu item is enabled or disabled seems to be determined by it's path - as such, we really need to use MENU_DYNAMIC_ITEM. However, this leaves us with the issue that we can't disable the menu item (which is what I'm trying to do).
For now I've just commented the menu item out of my local branch of the source. Somebody with a bit more Drupal experience may be able to offer more insight into how/if this issue can be resolved.
Comment #2
matt westgate commentedI cleaned up the address module menu system a bit, but I'm marking this as 'by design' since there currently isn't a clean way around this issue.