- "View" tabs always appear on nodes for all users
- Nodes that don't exist result in "Access denied" rather than "Page not found"

Comments

pwolanin’s picture

For me, I get "Page not found" for a non-existent node link (node/99999). Can you double-check?

for the tabs, seems I missed a line from chx's patch when I redid it (sorry): http://drupal.org/node/115847

the patch should look like:

@@ -987,12 +1002,13 @@ function menu_local_tasks($level = 0) {
     ksort($tabs);
     // Remove the depth, we are interested only in their relative placement.
     $tabs = array_values($tabs);
   }
-  return isset($tabs[$level]) ? $tabs[$level] : array();
+  // We do not display single tabs.
+  return (isset($tabs[$level]) && count($tabs[$level]) > 1) ? $tabs[$level] : array();
 }
 
 function menu_primary_local_tasks() {
pwolanin’s picture

StatusFileSize
new2.26 KB

ok, here's a patch for the single tab issue. Seems to work, though perhaps someone can think of a more elegant construction.

webernet’s picture

Title: Menu - Other Issues » Menu - Single Tab Issue

Tested the patch, everything seems to be working properly, single tabs are no longer being shown.

I am still getting "Access denied" instead of "Page not found" for non-existent nodes, but that can be taken care of in another issue.

chx’s picture

Status: Active » Reviewed & tested by the community
pwolanin’s picture

StatusFileSize
new2.98 KB

minor additional fix - should return an empty string, not an array, if the path is not found/denied

Steven’s picture

Status: Reviewed & tested by the community » Fixed

Tested and works as expected. Something tells me that repeated code in menu_local_tasks() could be refactored though...

Committed to HEAD.

pwolanin’s picture

I will look into refactoring as part of the menu system performance patch that I will start working on once the current book and menu patches get in.

Anonymous’s picture

Status: Fixed » Closed (fixed)