I skipped the Jun-12 dev-release because of some of the bugs in there but I installed the June-17 dev-release this morning which works pretty well and I have also updated the scheme.

What's missing in my menu is the Ubercart store-settings entry in the admin menu. Flushing cash doesn't help either.

BTW, I'm using this on a German site with the locale module enabled, but I guess that shouldn't make any difference.

Comments

sun’s picture

Project: Administration menu » Ubercart
Version: 6.x-3.x-dev » 6.x-2.0-rc3

Moving to Ubercart for now. I don't know whether UC did something special to add its items to admin_menu. 3.x-dev has been completely rewritten to re-use the regular menu system.

rszrama’s picture

Hmm... not sure... nothing in Ubercart is operating outside of the normal menu system. : ?

Island Usurper’s picture

Project: Ubercart » Administration menu
Version: 6.x-2.0-rc3 » 6.x-3.x-dev
StatusFileSize
new539 bytes

No, Ubercart uses the regular menu system, too. About the only thing that needed to be done as far as special handling was to rebuild the admin_menu structure when Ubercart was installed back in the 2.x branch. Other than that, it's always "just worked".

I think I found the problem, though. MENU_NORMAL_ITEM is the default type for a menu item. However, admin_menu_menu_alter() doesn't treat an unspecified type like MENU_NORMAL_ITEM. All of Drupal core, and probably most of contrib, doesn't specify a type, so they get 'menu_name' = 'admin_menu'. I've always specified the type, but MENU_NORMAL_ITEM gets treated like MENU_CALLBACK, which doesn't have its menu name changed.

Assuming that all MENU_NORMAL_ITEMs under "admin/" should be in the admin_menu, this patch should work.

jurgenhaas’s picture

Confirmed, that patch works.

sun’s picture

Status: Active » Needs review
sun’s picture

Status: Needs review » Needs work

I see. That means we have to cater for some additional menu item types, because hook_menu_alter() gets the unprocessed registry information of all hook_menu() implementations.

sun’s picture

Status: Needs work » Fixed
StatusFileSize
new913 bytes

Thanks for reporting, reviewing, and testing! Committed attached patch implementing a proper fix to all 3.x branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

@Island Usurper: You could save a fair amount of code lines if you'd just remove those MENU_NORMAL_ITEM definitions, because it's the default value for menu items. Additionally, I highly suggest to enable E^ALL error reporting in PHP -- I get a _bloat_ of PHP notices with Ubercart core modules enabled. Yes, you can hide them, but every single PHP notice slows down the system a bit.

Status: Fixed » Closed (fixed)

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

dave reid’s picture

Status: Closed (fixed) » Fixed

BTW this has caused a regression and makes the /admin page not work correctly at all. See #511744: /admin page links are broken with latest development snapshot.

Status: Fixed » Closed (fixed)

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