Menu breadcrumb doesn't work on draft pages set by workbench_moderation module.
This results in inconsistent view of draft and published version of node.
Here is how active menu item is selected for breadcrumbs

$menu_item = menu_get_item();
$result = db_query("SELECT mlid, menu_name FROM {menu_links} WHERE link_path = :menu_item", array(':menu_item' => $menu_item['href']));

The problem is that $menu_item['href'] in our case = node/%nid/draft, and there is no menu_links.link_path = node/%nid/draft in database. We need to use $menu_item['tab_root_href'] or $menu_item['tab_parent_href'] instead (which is node/%nid) on draft pages.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Andrei Tyuhai’s picture

FileSize
1.68 KB
xurizaemon’s picture

Status: Active » Closed (outdated)

Closing a lot of ancient (> 4 years) issues. It's fine to re-open if you think there's something of value to be discussed.