I get access denied when I press manage fields on views display bundle. Is this just unfinished functionality or is there something that I am missing?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bloomt created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review

No, you're right, there seems to be a problem.
At closer inspection, it seems that field_ui_admin_access() is to blame (which handles access to "Manage fields" and "Manage display", which are provided by the Field UI module): contrary to other page and access callbacks, the arguments here won't be automatically replaced with the corresponding path segments, so there's no way to check dynamically for the existence of the bundle in question.

Two ways around that (in this module – proper fix would probably be in the hands of the Field UI module), as far as I can see:
- Manually replace numeric IDs with that segment from the current page path. Will produce rubbish when the menu item is retrieved from a different page, but I don't think that will happen (except in the other tabs for that bundle, where the segment will be the same).
- Remove the "bundle exists" restriction from the access callback – however, I fear this would mean you could just put some rubbish as the bundle ID parameter and trigger all kinds of errors and notices. The Field UI module, while not providing (as far as I can see) any mechanism to work around that, doesn't seem to handle inexistent bundle parameters correctly/gracefully.

The attached patch implements the first option. Please see if it fixes the problem for you!

drunken monkey’s picture

Edit: Disregard this.

drunken monkey’s picture

FileSize
622 bytes

Oops, wrong patch in the previous comment – this is the right one.

drunken monkey’s picture

Version: 7.x-1.3 » 7.x-1.x-dev

(Problem exists in dev version, too.)

  • drunken monkey committed 3d5fe37 on 7.x-1.x
    Issue #2792665 by drunken monkey: Fixed "Access denied" when managing...
drunken monkey’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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