Problem/Motivation

The function menu_get_item() is called to exclude items that should not be visible in the breadcrumb.
The problem is the variable passed that contains the alias instead of the internal path.

Is also not possible to have two consecutive items with the same title, (i.e: Home -> Item -> Item -> Another | item/item/another).
I am not sure about the code that checks for duplicated local tasks.

if ($item['type'] != MENU_VISIBLE_IN_BREADCRUMB) {
  continue;
}

Maybe it should be something like:

if ($item['type'] == MENU_IS_LOCAL_TASK && $item['type'] != MENU_VISIBLE_IN_BREADCRUMB) {
  continue;
}

Steps to reproduce

Add Item with title Test with url /test
Add Item with title Test as child of Test with url /test/test
Add Item with title Another as child of the last Test with url /test/test/another
View Another item at /test/test/another

Proposed resolution

I propose to pass to the function menu_get_item() the variable $segment_normal_path that contains the internal path.

Remaining tasks

Understand if the condition about the local tasks can be improved to allow consecutive items with same title.

User interface changes

API changes

Data model changes

Comments

joaocsilva created an issue. See original summary.

joaocsilva’s picture

Adding patch to include check for local tasks.