Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.248
diff -u -p -r1.248 menu.inc
--- includes/menu.inc	22 Jan 2008 17:19:28 -0000	1.248
+++ includes/menu.inc	26 Jan 2008 16:59:18 -0000
@@ -837,9 +837,15 @@ function menu_tree_page_data($menu_name 
           $parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, $item['href']));
 
           if (empty($parents)) {
+            // If no link exists check if is a path to front page.
+            if (drupal_is_front_page()) {
+              $parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, '<front>'));
+            }
+            else {
             // If no link exists, we may be on a local task that's not in the links.
             // TODO: Handle the case like a local task on a specific node in the menu.
             $parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, $item['tab_root']));
+            }
           }
           // We always want all the top-level links with plid == 0.
           $parents[] = '0';
