user 1 is denied access to admin/settings/fasttoggle
bangpound - April 19, 2008 - 00:33
| Project: | Fasttoggle |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
User 1 on my site is denied access to the fasttoggle admin settings form. It doesn't appear in menus. When I try to access the URL by entering it manually, access denied!
All modules on my site are disabled except fasttoggle. Still doesn't work.

#1
Unfortunately, I can't reproduce this behavior. Please try rebuilding the menu (go to the modules page and click on save configuration). Are you sure that you are user ID 1?
#2
I have rebuilt the menus.
I am user 1. I can access admin/settings without a problem.
When I deliberately put in an access callback of TRUE in fasttoggle_menu, it works fine (which it should do, but this is insecure).
I looked in my rebuilt menu_router table, and this is the row for admin/settings/fasttoggle. Looks weird, doesn't it?
('admin/settings/fasttoggle', '', '', '0', 'a:0:{}', 'drupal_get_form', 'a:1:{i:0;s:24:"fasttoggle_settings_form";}', 7, 3, '', 'admin/settings/fasttoggle', 'Fasttoggle', 't', '', 6, '', 'Configure what fast toggling options are available.', '', 0, 'sites/bangpound.org/modules/fasttoggle/fasttoggle.admin.inc'),The 0 and a:0:{} stand out as the problem, but I don't know how that's getting picked up.
#3
If I add this line to the menu hook for fasttoggle, I fix the problem.
'access arguments' => array('administer fasttoggle'),The drupal 6 function _menu_build_router gave me the clue:
if (!isset($item['access callback']) && isset($item['access arguments'])) {// Default callback.
$item['access callback'] = 'user_access';
}
if (!isset($item['access callback']) || empty($item['page callback'])) {
$item['access callback'] = 0;
}
However it's odd the way you're not having this problem... I'm beginning to think I have a voodoo PHP installation.
#4
Ah, that was broken by 6.2. I fixed it in CVS. Thanks for reporting.
#5
http://drupal.org/node/248707 is the new release which fixes that bug.
#6
Automatically closed -- issue fixed for two weeks with no activity.