1. "my account" link can not be given "weight"

2. If edited, "my account" link behaves strangely: appears as separate menu in admin screen, disappears from navigation menu, etc.

3. Subitems can't be added under my account, or, strange things happen if you try to do that.

CommentFileSizeAuthor
#3 user_13.patch705 bytesJonBob
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yossarian’s picture

Reproduce the error:

1. Assign sub-menus to "my account" menu item

2. edit "my account" menu item - capitalize "My Account"

result:

1. sub-menus disappear from navigation block

2. "My Account" becomes separate Menu at the bottom of the menu administration page.

I would really like to capitalize the "my account" link. Any way to do that without bugging out the menus?

yossarian’s picture

anybody?

JonBob’s picture

FileSize
705 bytes

The "my account" menu item includes the user ID, so really cannot be customized. This is unfortunate. The attached patch corrects the mentioned bug by locking the menu item as it should be, but doesn't address the usability issue of not being able to customize the menu item. I suggest we move ahead with this patch for the 4.5 branch and, since time is short, likely 4.6.

Any suggestions for how to make this item editable? I think we'd need some way to have multiple paths for a single menu item... wildcards or something. But an implementation escapes me.

Steven’s picture

Perhaps we could change the path for "my account" to "user/me" or something? Link-wise it's not too hard to implement, just do "user/". ($account->uid == $user->uid ? "me" : $account->uid) or something when linking to that page.

Dries’s picture

The patch did not apply cleanly against DRUPAL-4-5. I modified the patch and committed it to DRUPAL-4-5 and to HEAD. I'm leaving this issue open for a couple more days.

Boris Mann’s picture

The same issue comes up with other menus that include the user ID (there are a couple, can't recall exactly which).

While user/me is interesting, it would then be inconsistent with things like blog/UID and blog/UID/feed.

Adding something like [uid] to menu creation might make menu code more complex, but should work.

tangent’s picture

It seems unlikely that I am the only one to notice/realize this so I'm probably missing something but ?=/user currently redirects to the "my account" url. Therefore, shortening the link to simply "/user" would make the url generic and serve the intended purpose no?

JonBob’s picture

Unfortunately, it's not quite that simple. Neither "user" nor "user/me" works as we would like due to the introduction of tabs. Right now "user" is a callback that does a drupal_goto() to "user/52". This means that if there were a menu item that pointed to "user", when you clicked on it you would end up at a different URL, and the "my account" link would not appear as active/expanded in the menu. Implementing "user/me" instead has problems with the tabs, because we would then have to register "user/me/edit" and so forth to make things show up correctly.

Drubu’s picture

Category: bug » support

I was trying to figure out how to capitalize the my account link on the menu and I found a way to do it! Since you can't edit it via Home » Administer » Menus, if you open the file user.module under the module folder in a program such as Dreamweaver and do a search for my account... the first result should be the one you change. (I know this for sure for version 4.5.2) If you capitalize it, save it, and upload it, refresh your browser window a couple times, it should fix it. If you don't really care about the capitalization of words in the menu, then don't worry about it.

Richard Archer’s picture

Status: Active » Closed (fixed)

Closing this issue...

The easiest way to change the name of the 'my account' menu item (and other special menus) would be with locale.module.

The patch has been committed.

And the rest of the discussion centers around a problem that doesn't need fixing, IMHO.

icenogle’s picture

Version: » 4.7.0-rc2
Status: Closed (fixed) » Active

I have the same symptoms described in http://drupal.org/node/13184#comment-16454, but with 4.7RC2. Actually, it cropped up somewhere in the 4.7 beta series -- I'm not precisely sure where, because neither I nor my users have great need for the item, at present. But I want to begin using profiles.

The "my account" item doesn't show up at all in the navigation menu; it shows up in admin/menus page, at the very bottom of the page, as though it were part of the Secondary Links menu.

I can't chalk this up to a corrupted db table, can I? This item, being locked, is generated from code, isn't it? Any ideas on how it came to be in this state, or what I can do to fix it?

Thanks!

icenogle’s picture

Status: Active » Closed (fixed)

I found my problem ("my account" menu item not showing up). It turns out that I had created a secondary link called "registration" and gave it a path of "user". That, in turn, caused "my account" to think its parent was "registration." My secondary link menu item was set to not expand -- it's a tab -- so the end result is that the "my account" menu item disappeared.

I fixed the problem by giving my "register" menu item a path of "user/register." That caused "my account" to reappear on the navigation menu.