There is a caching path of admin_menu/js/cache which is defined as part of the hook_menu() function on line 66 of admin_menu.module which is incompatible with our Nginx-based configuration. Our Nginx installation does not allow for URL paths that begin with /js for internal security reasons. As a result of the rejected path, the admin menu fails to render on our Drupal-based environments.

Regardless of our unique Nginx setup, I feel that it is in bad practice to begin a path for a module like this with /js.

My proposed solution: Adjust the hook_menu to define this cache callback with a different path that would not begin with /js.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ericjenkins created an issue. See original summary.

ericjenkins’s picture

Submitting a Patch #2 which changes the hook_menu() js cache path from js/admin_menu/cache to admin_menu/js/cache.

Rudi Teschner’s picture

I'm currently setting up a site on nginx as well and ran across the same issue.

Since I already am on 7.x-3.0-rc5+3-dev, the patch above does not apply anymore, but nonetheless shows the anser, for anyone who has the same issue. Due to one of the changes instead, the paths need to be changed in admin_menu.module from 'js/admin_menu/cache' to 'admin_menu/js/cache' as you proposed and it starts working right away.

Thanks your your solution. :)

tisteegz’s picture

I am using 7.x-3.0-rc5 and I am getting this issue intermittently. When it disappears I have to then clear the cache and it works again. But it is the same error with the cache file.

EDIT: Changing those two lines did not fix the issue for me. My issue was this: https://www.drupal.org/project/admin_menu/issues/1622904

Chris Matthews’s picture

Version: 7.x-3.0-rc5 » 7.x-3.x-dev
Issue tags: -nginx, -caching

@tisteegz, should this issue be closed as a duplicate of issue #1622904: Admin menu disappears randomly (again) if client-side cache option enabled?

Chris Matthews’s picture

Assigned: ericjenkins » Unassigned
ericjenkins’s picture

Version: 7.x-3.x-dev » 7.x-3.0-rc6
FileSize
1.07 KB

Re-rolling this as Patch #7 for compatibility with admin_menu version 7.x-3.0-rc6.

anneeasterling’s picture

Tip for anyone else searching for an answer to this issue, please see:
https://www.drupal.org/project/admin_menu/issues/2219467

We switched to the dev release and resolved the issue we were having with disappearing admin menu.

mikedance’s picture

I have resolved this issue by adding the following exclusion to my nginx virtualhost configuration:

location ~ /js/admin_menu/cache/.*\.js {
  try_files $uri $uri/ /index.php?$query_string;
}
thalles’s picture

This issue look me solved.

thalles’s picture

Category: Bug report » Support request
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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