Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | menu_breadcrumb_breadcrumbs_on_draft_pages.patch | 1.68 KB | Andrei Tyuhai |
Comments
Comment #1
Andrei Tyuhai CreditAttribution: Andrei Tyuhai commentedComment #2
xurizaemonClosing a lot of ancient (> 4 years) issues. It's fine to re-open if you think there's something of value to be discussed.