_menu_load_objects() does not pass already loaded arguments to subsequent argument loaders

Created on 11 December 2012, about 12 years ago
Updated 3 March 2025, 6 days ago

Problem

  • When defining a route
    $items['foo/%foo/bar/%bar'] = array
      'load arguments' => array(1),
    );
    

    then the expectation is that foo_load() is invoked with arg(1), and bar_load() is invoked with arg(3) and the already loaded arg(1).

    That is, because I did not specify array('1') (string). I specified array(1) (integer).

    The menu system correctly loads the first dynamic argument currently, but fails to pass the loaded argument to the second loader.

The only (ugly) workaround right now is to specify '%map' as load argument, and manually retrieve the loaded argument from the index.

This bug got revealed though ✨ Move simplified Profile module into core Closed: won't fix , respectively #1726822: Port Profile2 to D8 β†’

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

menu system

Created by

πŸ‡©πŸ‡ͺGermany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • Quick fix

    Very small and simple change. Preferred over Quickfix.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024