Why is there an "Administration shortcuts" menu being created in toolbar.install?

function toolbar_install() {
  $t = get_t();
  $menu = array(
    'menu_name' => 'admin_shortcuts',
    'title' => $t('Administration shortcuts'),
    'description' => $t('The <em>Administration shortcuts</em> menu contains commonly used links for administrative tasks.'),
  );
  menu_save($menu);

  // Add starter convenience shortcuts.

  // ... rest of function omitted
}

I think this must have originally been intended to go in the toolbar, but now its the Shortcuts menu being used, so I think this should be removed.

Leaving it there is very confusing, since it starts with the same items as Shortcuts, and has almost the same name, and shows up on Blocks lists along with the real Shortcuts, but it isn't actually related.

Comments

jhodgdon’s picture

Sorry, that should say it's the Shortcuts module that is used inside Toolbar, not this special menu.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new1.75 KB

Here's a patch that removes the toolbar_install() function completely.

Probably the whole toolbar.install file should be removed, since that was the only function in it.

jhodgdon’s picture

Issue tags: +#d7ux

tagging

xmacinfo’s picture

If we remove all these install functions, what would be displayed by default in a new install in the shortcut bar. Would the shortcut bar be empty?

jhodgdon’s picture

No, that's the point. The shortcut bar uses the Shortcuts module, which has nothing to do with this menu. This menu is purely there to confuse you. I'm sure it had a purpose at one time, but it's been replaced but wasn't removed.

jhodgdon’s picture

Issue tags: +D7UX

Adding right tag

David_Rothstein’s picture

Priority: Normal » Critical
StatusFileSize
new1.78 KB

Indeed, the entire toolbar.install function should be removed.

(We actually did remove it as part of the initial committed shortcut patch at http://drupal.org/node/511286#comment-2160402, but I guess what happened is that since I forgot to call it out in the code comment and the patch was large, it went unnoticed and no one ran "cvs remove"...)

Also, this is critical because it prevents the toolbar module from being installed under certain situations - see #633234: Error when enabling the toolbar module on a minimal site (which is duplicate).

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -D7UX, -#d7ux

Automatically closed -- issue fixed for 2 weeks with no activity.