Download & Extend

Admin Menu disappears when I set "Optimize JavaScript files" to Enabled

Project:Administration menu
Version:6.x-3.0-alpha3
Component:CSS / Browser Support
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I was tweaking some performance settings prior to going live (.../admin/settings/performance) and noticed my admin menu disappeared when "Optimize JavaScript files" is Enabled.

Using:
Drupal 6.14
Chrome 3.0.195.21

Peace,
Brian

Comments

#1

Subscribe. I'm having the exact same issues with Drupal 6.14 and Firefox 3.5.3 after enabling javascript aggregation on a Blueprint-based child theme.

#2

Subscribe, same problem.

#3

subscribe with Drupal6.14 and FF 3.0.14. I played around a lot with Core-Performance and Boost these days and noticed that whenever the Core JS Optimization is activated Admin menu diappears AND modules that use javascript like the Feedback module or the DHTML Menu module loose their js-functionality.

#4

Subscribing. Also just noticed same problem.

It appears that when enabling CSS aggregations, most of Drupal's CSS is combined, although the admin menu CSS stays separate. When enabling JS aggregation, I don't think the admin menu code is kept separate - perhaps part of the problem.

Simon.

#5

Exactly the same problem over here on multiple drupal sites of mine.

#6

Subscribe.

#7

Subscribe. Same issue seen under Firefox and IE.

#8

Status:active» closed (duplicate)

This sounds like a Drupal core bug.

Thanks for taking the time to report this issue.

However, marking as duplicate of #360344: Enabling "Optimize JavaScript files" breaks collapsible form items..
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.

#9

I think that this is a core issue, and it has to do with how Drupal handles comments and whitespace when it compresses both CSS and Javascript files.

There's a patch (here) http://drupal.org/node/444228#comment-2249118 for common.inc. that fixes this issue for me.

I found it because a site I was running using Zen went to WSOD when css optimization was turned on. This same patch, though, seems to fix the javascript issues In Blueprint as well.

#10

Hi,
I tried the patch too, but it did not work for me :(

Using:
Drupal 6.14
Chrome 4.0
FF 3.5.5

#11

Status:closed (duplicate)» needs review

After browsing through multiple threads the solution is found (well, works for me like a charm :))

The problem is related to Administration Menu Toolbar.

In file admin_menu_toolbar.js
Add "Drupal.admin = Drupal.admin || {};"
Before "Drupal.admin.behaviors = Drupal.admin.behaviors || {};"

This will initialize Drupal.admin and the problem will be gone.

#12

Status:needs review» reviewed & tested by the community

#11 works thanks

I notice this is how it is already in admin_menu.js

#13

exactly. same. this line of code exists..
my toolbar doesn't render after upgrading drupal core.

#14

#11 works thanks

#15

Status:reviewed & tested by the community» closed (duplicate)

Marking as duplicate of #557062: Drupal.admin is not known yet when admin_menu_toolbar comes with its js include.

#16

#11 thank you very much, its work))

nobody click here