Just upgraded to Drupal 6.14 and new admin menu alpha at same time.

When I installed Administration menu Toolbar style, the menu started disappearing on every new page until I cleared cache. It would then come back for that page, but disappear when I went to a new one.

Disabling Administration menu Toolbar style made the problem go away.

Read somewhere that javascript compression might have something to do with it. Disabled JS compression and activated "Toolbar style" again, and the whole disappearance problem went away.

Does that narrow things down enough, or is there something else I could do?

Using Chrome 4.0.249.11

Cheers all! :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Status: Active » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #601918: Default css overrides toolbar css.

patcon’s picture

Sorry sun, I don't quite understand... how is mine a duplicate of that? Mine didn't involved an offset of the toolbar, nor css at all (as far as I could tell). And my problem went away when I disabled javascript, while the other issue doesn't even mention JS...

Sorry, just confused... :)

spelcheck’s picture

bump! my admin menu disappears when 'page compression' is turned on.. clearing cache fixes it for one single page view, then usually it goes away. please re-open this issue, thanks!

edit: I need to do more troubleshooting. Here's what I've found soo far:

-once it disappears, 'performace->clear cache data' will bring it back until the page it refreshed.
-after a 'clear cache data', you can navigate to any page and will see the menu until any page is refreshed.
-once it disappears, it will not show for any other pages until performance clear cache data.
-this problem is not dependent on theme
-no other performance options seem to make any difference on this problem

sun’s picture

This issue should be fixed in the latest development snapshot.

spelcheck’s picture

I'm now running the latest Feb20th 6.x dev and I don't see any change. Are there any notes you could share on what the problem was/is? Thanks!

edit: the difference I've found in the new dev version is that navigating away from the performance page will kill it, whereas before you could navigate away as long as you didn't click 'refresh' on any of those pages. Also, I've found that once it breaks in one session, it will break it for all sessions.

OnkelTem’s picture

Version: 6.x-3.0-alpha3 » 6.x-3.0-alpha4
Status: Closed (duplicate) » Active

I confirm all above.
With page compression turned on about half of the menu suddenly disappears and only cache cleaning or turning page compression helps.

I'm on the latest git version:

commit 6ecf9c6ea7bee6378e04cda38fec47785c258a4f
Author: sun <sun@unleashedmind.com>
Date:   Thu May 17 23:14:46 2012 +0200
OnkelTem’s picture

Title: Toolbar style with JS compression causes disappearance until cache clear » Partial menu disappearance (cut) when "Page compression" is on
Version: 6.x-3.0-alpha4 » 6.x-3.x-dev
Status: Active » Needs review
FileSize
963 bytes

I wonder why original topic was saying about "JS compression". The bug triggers when Page compression is turned on actually and it doesn't depend on Toolbar or whatever style.

jstoller’s picture

Status: Needs review » Reviewed & tested by the community

Admin menu was only partially rendering on my site. It would show the icon menu, the "Content management" menu, and the first three items in the "Site building" menu, but then it would cut off. Emptying the cache, or using Devel to rebuild the menus would bring everything back, but once I reloaded the page it would all disappear again. Also, this was only happening on my production site. My local dev site (using MAMP) exhibited none of these issues, even though I was copying over the exact same database and using git to ensure I had the exact same files.

After reading several issues here about caching, I started poking around the performance settings on my site. I disabled "Gzip page compression" and that appeared to have solved my problem.

Just now I manually edited admin_menu.module, changing line 413 to use strlen() instead of drupal_strlen(), as suggested in the patch from #7. I then enabled gzip page compression again and cleared my cache. I've been browsing the site and reloading pages with no apparent problems.

Marking this patch RTBC.

jstoller’s picture

I did a little more poking around. Both my dev and production sites report that $GLOBALS['multibyte']=1, which would trigger drupal_strlen() to use the mb_strlen() function. However, if I change drupal_strlen() to mb_strlen(), the result still works on my local dev while failing on my production site. I assume this means that, on my production server, Admin Menu thinks it's dealing with a multibyte string, when in fact it isn't, so it comes up short on its character count.

Using firebug to view the response headers, my dev site reports Content-Length=7691, whether using mb_strlen() or strlen(). However, my production site reports Content-Length=7683 when using strlen(), but only 5389 when using mb_strlen().

sun’s picture

Thanks for testing, @jstoller!

Hm. Apparently, Drupal core does not add any Content-Length HTTP header at all for cached page responses.

Any chance you could test whether we can simply remove that header entirely?

jstoller’s picture

OK. I tried commenting out line 413 entirely and the menu kept working on both my local and remote servers, so I guess we can remove it. When I checked the response headers in Firebug, I confirmed that there was no Content-Length specified on my remote server, but the local MAMP server still came back with Content-Length=7693. I don't know what that means, but there you go.

sun’s picture

Status: Reviewed & tested by the community » Fixed
FileSize
551 bytes

Thanks for reporting, reviewing, and testing! Committed attached patch to 6.x-3.x.

A new development snapshot will be available within the next 12 hours.

Status: Fixed » Closed (fixed)

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