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
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | admin_menu-DRUPAL-6--3.toolbar-weight.patch | 1.12 KB | sun |
Comments
Comment #1
legion80 commentedIs 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?
Comment #2
dave reidMuch easier fix just by using
Drupal.admin = Drupal.admin || {};in admin_menu_toolbar.js. Committed this to both HEAD and DRUPAL-6--3. Thanks!Comment #4
lowkee commentedThe 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.
Comment #5
sunThe 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.
Comment #6
sunThanks 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.
Comment #7
sunAlso fixed in HEAD.