Menu Breadcrumb on node/%nid/draft pages (workbench_moderation support)

Created on 22 March 2014, about 11 years ago
Updated 29 March 2024, about 1 year ago

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.

โœจ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡พBelarus Andrei Tyuhai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    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.

Production build 0.71.5 2024