It turns out that the requirement that we formulated in
#1186208: Unable to chain in front of some system paths,
namely that client modules should also call cmac() on any MENU_DEFAULT_LOCAL_TASK item, whenever calling it the parent item, is unreasonable.

Case in point is #1337412: Advanced Forum breaks Forum Access 6.x-1.7: AF creates a path forum/view and makes this the MENU_DEFAULT_LOCAL_TASK (and unfortunately, it also specifies 'access arguments' — quite unnecessarily, but that's what it does...).

FA calls cmac() on forum, but it does not know about forum/view, which is not in core. It would have to scan the router item array for a MENU_DEFAULT_LOCAL_TASK for every menu item that it wants to chain to.

[BTW, the D6 version of AF got fixed (to not specify access for forum/view) at the end of the long discussion, but the same misbehavior is still present in the D7 version, making the D7 versions of AF and FA incompatible.]

CommentFileSizeAuthor
#1 chain_menu_access.v2.1757616.1.patch4.91 KBsalvis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

This requires an API change: rather than passing the router item to change, we need to pass the array of router items and the path (index into the array).

salvis’s picture

Status: Active » Needs review
salvis’s picture

Status: Needs review » Fixed

Committed to

  • the new 7.x-2.x branch (because of the API change)
  • the existing 8.x-1.x branch (because no one is using the D8 version yet).

Status: Fixed » Closed (fixed)

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