Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This affects both Drupal 7 & 8.
Since MENU_MAX_PARTS is set to 9 no router path can be over 9 parts long. This is not documented in the api for hook_menu in system.api.php. So if you are implementing hook_menu there is not an obvious way to tell this.
I think this should be documented in api.php file.
Comment | File | Size | Author |
---|---|---|---|
#2 | system-document_menu_parts_limit-1983832-1.patch | 820 bytes | tedbow |
Comments
Comment #1
tedbowjust fixing title
Comment #2
tedbowHere is patch to start with.
Comment #3
YesCT CreditAttribution: YesCT commentedwhat is an example path and key that works and does not work.
I'm a little confused if it's 9 or 10 that is not allowed.
a/b/c/d/e/f/g/h/i/j/k
is allowed?
it has 11 parts and 10 slashes
Comment #4
PanchoNote that missing documentation lead to #2035877: URL with more than 10 slashes is not working in new routing system.
I added a small note in the New routing system change record and the WSCCI conversion guide.
Also, see: #2036677: MENU_MAX_PARTS defined three times
Comment #5
jhedstromThis hook was removed in #2177031: Remove menu_get_item() and every use of it. . I'm not sure where the new place to document this is.
Comment #17
smustgrave CreditAttribution: smustgrave at Mobomo commentedMoving to outdated since the variable this ticket is referencing, MENU_MAX_PARTS, no longer exists in Drupal 9
If you feel this is still an issue please reopen.
Comment #18
klonosThis still hasn't been documented, and MENU_MAX_PARTS is still a thing for D7 (which is still supported). So please keep it open. Thanks.
Comment #19
klonos