Because admin_menu module has a weight of 100 and the admin_menu_toolbar gets 0, the toolbar javascript is included first. That's the reason why Drupal.admin is not known yet.
Setting the module weight for admin_menu_toolbar to 101 fixes the problem.
The problem is in de dev version as well.

Hail firebug!

Greetz,
Stalski

CommentFileSizeAuthor
#6 admin_menu-DRUPAL-6--3.toolbar-weight.patch1.12 KBsun

Comments

legion80’s picture

Is there a patch available for this? I saw what was going on, and changed it directly in MySQL, but wonder how to handle this in code. Does there need to be a admin_menu_toolbar.install file?

dave reid’s picture

Status: Active » Fixed

Much easier fix just by using Drupal.admin = Drupal.admin || {}; in admin_menu_toolbar.js. Committed this to both HEAD and DRUPAL-6--3. Thanks!

Status: Fixed » Closed (fixed)

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

lowkee’s picture

Status: Closed (fixed) » Needs review

The fix in #2 was somehow changed in the latest build, because I am getting an error again.

Line 2 has "Drupal.admin.behaviors = Drupal.admin.behaviors || {};" which throws the error, since there is no Drupal.admin.

Adding "Drupal.admin = Drupal.admin || {};" above that line fixes the error.

sun’s picture

Status: Needs review » Needs work

The committed change was http://drupalcode.org/viewvc/drupal/contributions/modules/admin_menu/adm... (always attach a patch containing the committed changes, please ;)

While that change makes sense in any case, we also need to increase the module weight to 101, since that will automatically resolve the CSS problems mentioned in another issue in the queue, too.

Let's care for D6 first, and afterwards for D7, which needs an entirely different patch, because we can reset + remove the entire special weighting.

sun’s picture

Version: 6.x-3.0-alpha3 » 7.x-3.x-dev
Status: Needs work » Patch (to be ported)
StatusFileSize
new1.12 KB

Thanks for reporting, reviewing, and testing! Committed to all branches.

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

sun’s picture

Status: Patch (to be ported) » Fixed

Also fixed in HEAD.

Status: Fixed » Closed (fixed)

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