Problem/Motivation

user_menu() relies on a hitherto unknown to me feature of the menu system that child menu items inherit the page callback of the parent.

This breaks hard if you override the parent item to have a different menu callback, i.e. by replacing admin/people with a view.

Proposed resolution

Specify the page callback.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#7 2674028.patch467 bytescatch
#2 2674028.patch406 bytescatch

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review
StatusFileSize
new406 bytes

Here's a patch.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

It is IMHO a really obscure hook_menu() feature so its better to not rely on it where possible.
This breaks at least the admin_views module.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Note there's a stackexchange support request for this from 2012, http://drupal.stackexchange.com/questions/22922/custom-admin-people-view...

catch’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2674028.patch, failed testing.

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new467 bytes
plach’s picture

Status: Needs review » Reviewed & tested by the community

Now for reals

dawehner’s picture

Retested, to ensure that we don't accidentally have some issue on PHP 5.5

fabianx’s picture

Priority: Normal » Major
Issue tags: +Pending Drupal 7 commit

Thanks all, marked for commit.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Pending Drupal 7 commit +7.50 release notes

Committed to 7.x - thanks!

I made a small change on commit to move the new "page callback" element to a more logical place in the array (directly above the existing "page arguments" element).

  • David_Rothstein committed a1f2672 on 7.x
    Issue #2674028 by catch: Add page callback to admin/people/create menu...

Status: Fixed » Closed (fixed)

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