? issue-992376.patch
? menu_callback_home_title.patch
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.425
diff -u -p -r1.425 menu.inc
--- includes/menu.inc	27 Nov 2010 20:25:44 -0000	1.425
+++ includes/menu.inc	12 Dec 2010 21:35:58 -0000
@@ -2302,11 +2302,25 @@ function menu_set_active_trail($new_trai
       }
       list($key, $curr) = each($tree);
     }
-    // Make sure the current page is in the trail (needed for the page title),
-    // if the link's type allows it to be shown in the breadcrumb. Also exclude
-    // it if we are on the front page.
+    // Make sure the current page is in the trail (since its needed for the page
+    // title), don't add it if we are on the front page (since it's already in
+    // the trail).
+    //
+    // See #965272: The title for a page is determined by taking the last item in the
+    // active path which is not a local task. The active path is seeded with a
+    // link to home and each item in the path with type
+    // MENU_VISIBLE_IN_BREADCRUMB is added to the list.
+    // At the end of this process the preferred link for the current item is
+    // added to the end of the breadcrumb if it is flagged as
+    // MENU_VISIBLE_IN_BREADCRUMB or MENU_CALLBACK. If we don't do this,
+    // items of type MENU_CALLBACK without parents will result in the page title
+    // being Home- as this would be the only item in the active path. Adding the
+    // preferred link to the breadcrumb trail even if it is only a MENU_CALLBACK
+    // does not have an adverse affect on the breadcrumbs as the current page
+    // is always dropped from the breadcrumb trail anyway
     $last = end($trail);
-    if ($last['href'] != $preferred_link['href'] && ($preferred_link['type'] & MENU_VISIBLE_IN_BREADCRUMB) == MENU_VISIBLE_IN_BREADCRUMB && !drupal_is_front_page()) {
+    if ($last['href'] != $preferred_link['href'] && !drupal_is_front_page() &&
+        in_array($last['type'], array(MENU_CALLBACK, MENU_VISIBLE_IN_BREADCRUMB), TRUE)) {
       $trail[] = $preferred_link;
     }
   }