Active
Project:
Administration menu
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2013 at 15:26 UTC
Updated:
19 Jul 2018 at 00:38 UTC
Jump to comment: Most recent
Hi,
When I enable the admin menu and I clear the cache here is a drupal message :
Notice : Undefined offset: 0 dans _menu_check_access() (ligne 633 dans includes/menu.inc).
Notice : Undefined offset: 1 dans _menu_check_access() (ligne 633 dans includes/menu.inc).
Any ideas for debug ?
Regards,
Comments
Comment #1
_grizly commentedI'm getting these too:
On admin/structure/taxonomy/name:
Notice: Undefined offset: 0 in _menu_check_access() (line 633 of /includes/menu.inc). Notice: Undefined offset: 1 in _menu_check_access() (line 633 of /includes/menu.inc). ......(snipped linux paths)
Thought it might be tied to either Taxonomy_Menu or something as when I visit a taxonomy page it seems to create a 0 length menu item (in Main Menu.. useful) and produces the following:
Commenting out that line:
removes the error, but not the faux menu item..
The link in the faux item is taxonomy/term/%, so I think I have a faulty view somewhere.. still looking.
Disabled Taxonomy_Menu, still both errors.. bollocks.. will continue hunting through views.
EDIT: FYI: It does both of these without the administration_menu running.. I've granted a normal user-profile access to modify the taxonomy, and it appears on there too.. irritating.
Comment #2
wylbur commentedWe had a fresh install of Drupal 7 and admin views and admin menu modules. The exact same error messages showed when we enabled a new version of Admin Menu.
To remove the error messages:
- Disable the Admin Views Module
- Go to the Views UI and delete all existing Admin Views
- Renable the Admin Views Module
This cleared up the errors for us.
Comment #3
abiyub commentedi you have reatten a custom module, and have called hook_menu, Do the following to you hook_menu Properties.
'access callback' => 'user_access',
to
'access callback' => TRUE,
Or if you give permission to all users this issue can be solved.
Comment #4
3cwebdev commentedAfter A LOT of troubleshooting the cause of this error for me was a hook_menu() function that had a non-existent permission parameter. I added the hook_permission() for the missing 'access arguments' and the error was finally gone.
Comment #5
prabhakarb commentedIn order to resolve the Notice: Undefined offset: 0 in _menu_check_access ()
Add the 'access arguments' => array (//args) in hook_menu () implementation. Use following combinations for 'access arguments' to acces the content of the your specified menu
1. Anonymous users
'access arguments' => array('access content'),
2. Authenticated users
'access callback' => 'user_is_logged_in',
'access arguments' => array('access content'),
3. Only administer users
'access arguments' => array('administer users'),
Look https://www.drupal.org/node/553368 for more info on Access Arguments
Comment #6
damiankloip commentedSome of these solutions are a joke. They are not fixes for the problem. You're just altering the menu item to allow access to all or overriding the view arguments (by hard coding it). We're pretty sure this is a problem that occurs when you have two admins views using the same path. So likely a view has been cloned.
Comment #7
cybertrail commented#2 fixed the notice for me. Thanks wylbur.
Comment #8
joelpittetThere is no patch on this issue to review so changing the status to 'active'