Check whether menu_get_item finds the relevant router item. Create items for the following paths: test, test/test, test/test/%, test/%test and check the following paths: test (matches test), test/1 (matches test/%test), test/1/test (matches test/%test again and passes in test as argument to the page callback), test/test (matches test/test), test/test/test (matches test/test/%). Feel free to replace 'test' in the above with any other string of course.

CommentFileSizeAuthor
#4 Test_menu_get_item_0.patch3.82 KBdawehner

Comments

Wisif’s picture

Assigned: Unassigned » Wisif
dawehner’s picture

Assigned: Wisif » dawehner
Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new3.82 KB

i tryed to create this test but

    //test/1 (matches test/%test),
    //test/1/test (matches test/%test again and passes in test as argument to the page callback),

didn't returned what chx expected. Both returned 'test' as path of the router_item.

i expect i'm doing something wrong

sun.core’s picture

Component: tests » menu system
Assigned: dawehner » Unassigned
Category: bug » task
Status: Postponed (maintainer needs more info) » Needs review

PNR to see what the bot thinks of this patch today.

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Priority: Critical » Normal

Moving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.