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.

Comments

kkaefer’s picture

Status: Active » Postponed (maintainer needs more info)

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?

Anonymous’s picture

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.

Anonymous’s picture

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.

kkaefer’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ah, that was broken by 6.2. I fixed it in CVS. Thanks for reporting.

kkaefer’s picture

http://drupal.org/node/248707 is the new release which fixes that bug.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

  • Commit f5c1acb on 6.x-1.x, master by kkaefer:
    Fixing access arguments for 6.2 (reported in #248486 by bangpound)