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
.
Comment | File | Size | Author |
---|---|---|---|
#7 | admin_menu_invalid_path-2900725-7.patch | 1.07 KB | ericjenkins |
#2 | admin_menu_invalid_path-2900725-2.patch | 1.13 KB | ericjenkins |
Comments
Comment #2
ericjenkins CreditAttribution: ericjenkins commentedSubmitting a Patch #2 which changes the
hook_menu()
js cache path fromjs/admin_menu/cache
toadmin_menu/js/cache
.Comment #3
Rudi Teschner CreditAttribution: Rudi Teschner commentedI'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. :)
Comment #4
tisteegz CreditAttribution: tisteegz commentedI 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
Comment #5
Chris Matthews CreditAttribution: Chris Matthews commented@tisteegz, should this issue be closed as a duplicate of issue #1622904: Admin menu disappears randomly (again) if client-side cache option enabled?
Comment #6
Chris Matthews CreditAttribution: Chris Matthews commentedComment #7
ericjenkins CreditAttribution: ericjenkins commentedRe-rolling this as Patch #7 for compatibility with admin_menu version 7.x-3.0-rc6.
Comment #8
anneeasterling CreditAttribution: anneeasterling as a volunteer commentedTip 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.
Comment #9
mikedance CreditAttribution: mikedance commentedI have resolved this issue by adding the following exclusion to my nginx virtualhost configuration:
Comment #10
thallesThis issue look me solved.
Comment #11
thalles