Hi,

After an upgrade from 5.x to 6.11 everything seemed to work great
however, after a few days the site started not to display the edit/view tabs not only for the users that has access, but for me (administrator user/1) as well
it is not a permission problem (like other issues) since both me and the user can edit the nodes when we enter the address manually (www.example.com/node/xx/edit). In this case the tab menus are shown correctly.

when this happened something else strange happened as well
1) all the 'administrator menu' entries for the user disappeared (not for me)
2) the gmap location block does not display in node view (for all users, even anonymous) ,but only when i edit the node

I thing they are connected somehow and has to do something with menu_router table
i updated the site to 6.12, cleared the cache, rebuild the menus with devel module as other issues suggested but nothing happened ...
any suggestions?

Comments

jimkont’s picture

Project: Drupal core » Node breadcrumb
Version: 6.12 » 6.x-1.0-beta2
Component: menu system » Code

by toggling the modules on/off i found out that this is a node_breadcrumb issue
when i disabled the module everything was normal

edhel’s picture

I don't know yet how to correctly port node_breadcrumb to Drupal 6.x... unfortunately.

Anonymous’s picture

I moved from the 5.x to 6.x branch back in November and have seen no issues other than those of my own making.

Lots of modules installed and lots of memory available. I can see a potential issue when the list of node breadcrumbs grows big without some form of paging.

Which makes me wonder if resources may be an issue for the OP ?

Also in my case Update Status is off, as it seems to behind many issues i have had, again resources related

Anonymous’s picture

Version: 6.x-1.0-beta2 » 6.x-1.0-beta3

I confirm that 6.x-1.0-beta3 makes disappear the edit/view tabs. If I revert to 6.x-1.0-beta2 or I disable the module, everything get back to work properly.

edhel’s picture

I hope that it's fixed in beta4 at last)

Anonymous’s picture

Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
Status: Active » Closed (fixed)

beta4 works properly

richi’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta5
Status: Closed (fixed) » Active

In 6.x-1.0-beta5 the 'edit/view' tabs disappeared again.

With some testing i found out, that if i set the line

// menu_set_item($_GET['q'], $menu_item);

to

// menu_set_item($_GET['q'], $menu_item);

in function

function _node_breadcrumb_set_location($mid, $last_path, $last_title) {

then the tabs come back.

I am not shure if this helps, but maybe

edhel’s picture

On my test system edit/view links are visible in beta5.

Beta5 differs from beta4 only by one new line drupal_get_title() in function node_breadcrumb_init().

richi’s picture

On my testsystem whith beta4 the 'edit/view' tabs also disappears.

nigelcunningham’s picture

Confirmed with node breadcrumb 6.x-1.0-beta6.

hillaryneaf’s picture

Has there been any progress on this? I can't use Node Breadcrumb module at all with my site when the View and Edit tabs are missing on all nodes for all users including Admin.

tarunkumar’s picture

I am also facing this issue
all f the edit/view tabs disappear and also not able to configure the block elements

jct’s picture

Version: 6.x-1.0-beta5 » 6.x-1.0-beta6

I am also experiencing this issue in Beta 6.

drupalninja99’s picture

also still happening in beta 6

drupalninja99’s picture

ya that works

drupalninja99’s picture

i played around with the menu_set_item thing and it doesnt break every node type just some, thats what i dont get

murrayw’s picture

I too have been having problems with other modules (apachesolr) due to the problematic menu_set_item call. The nodewords meta tags issue listed in the queue is also related. It seems that fixing this issue will clear up a lot of problems people are having. I had prepared a bug report but then saw it was essentially a dupe of this one. I have therefore reproduced the highlights below...

I believe that I have found a bug with the way node_breadcrumb interacts with the $router_items in node_get_menu(). In short, the menu_set_item() call (node_breadcrumb.module, line 9) seems to be polluting the $router_items static variable in menu_get_item() making item/object lookup fail for modules subsequently calling menu_get_object and menu_get_item. This problem will lead to errors in modules making subsequent calls to these functions. Difficult bug to track down because failures are silent.

My set up:
- node_breacrumb enabled
- view at "businesses"
- node at "business/businessX" (id = 1089 for this example)
- node_breadbrumb has menu set to use the view for businesses

The call to node_set_item on line 9 of node_breadcrumb.module is the problem.

menu_set_item($_GET['q'], $menu_item);

I believe that the fix would be to pass the view path into the first param (ie businesses) , rather than the node path (node/1089).

These were the params going into menu_get_item(). Please node that the view is the router_item rather than node 1089!

$path = node/1089
$router_item = Array
(
[path] =>
[load_functions] =>
[to_arg_functions] =>
[access_callback] =>
[access_arguments] =>
[page_callback] =>
[page_arguments] =>
[fit] =>
[number_parts] =>
[tab_parent] =>
[tab_root] =>
[title] => Businesses
[title_callback] =>
[title_arguments] =>
[type] =>
[block_callback] =>
[description] =>
[position] =>
[weight] => 0
[file] =>
[menu_name] => menu-node-containers
[mlid] => 1195
[plid] => 0
[link_path] =>
[router_path] =>
[link_title] => Businesses
[options] => Array
(
[attributes] => Array
(
[title] => Top rated businesses.
)

)

[module] => menu
[hidden] => 0
[external] => 1
[has_children] => 0
[expanded] => 0
[depth] => 1
[customized] => 1
[p1] => 1195
[p2] => 0
[p3] => 0
[p4] => 0
[p5] => 0
[p6] => 0
[p7] => 0
[p8] => 0
[p9] => 0
[updated] => 0
[access] => 1
[href] =>
[localized_options] => Array
(
[attributes] => Array
(
[title] => Top rated businesses.
)

)
)

timatlee’s picture

Any activity on this?

kcolwell’s picture

I just looked through all of the #17 post and couldn't make heads or tails out of how the new menu router stuff actually works.

I'm hoping that someone smarter than me can figure this one out.

apolitsin’s picture

have this problem too

drupalninja99’s picture

still have this issue, it follow the underlying problem with menu_set_active_item() so I don't think there's an easy fix unfortunately.

DrupT’s picture

I have this problem too.... core/module at latest version

p.selfin’s picture

ah....
I have this problem too....

superpod’s picture

Likewise.

dman’s picture

Status: Active » Needs review
StatusFileSize
new6.92 KB

I found this happens if the menu item the rule refers to is invalid.

To replicate.
Create a rule, referring to a menu item.
DELETE that node or menu item.
View content that is supposed to use that rule
= all navigation gone, including local tabs.

Solution - fix the rule to refer to a real menu item.

Patch - ensure that the retrieved menu item is valid before setting the system properties to use it.


function _node_breadcrumb_set_location($mid, $last_path, $last_title) {
  $add_active_class = variable_get('node_breadcrumb_add_active_class', FALSE);
  $menu_item = menu_link_load($mid);

  if (empty($menu_item)) {
    // Setting a node breadcrumb rule with a non-existent or deleted menu id causes
    // strange errors (the rule removes all navigation) so the import will fail if
    // the mlid is invalid.
    // Ensure that doesn't happen
    watchdog('node_breadcrumb', 'Node breadcrumb rule refers to a non-existent menu link id. Ignoring', array(), WATCHDOG_ERROR);
    return;
  }      
dman’s picture

StatusFileSize
new1.09 KB

Sorry, messy patch! Got some other dev happening beside it!
That's going into another issue.
Use this one instead

lyudmila’s picture

Thanks, but it didn't work for me - tabs are still gone... Did anyone else try the patch?

alison’s picture

A different fix dman came up with worked perfectly for me -- lyudmila (and anyone else), I strongly recommend giving it a try:
http://drupal.org/node/1041706

MathRo’s picture

Hi, I'm working on D7 (with OG, view, panel, filed collection) and find the same problem (no tab 'view/edit).
I found that if I unchecked the permission "Administer Group permissions" for one role, he will lose his "View/Edit" tab.
I don't know if OG is the real problem but I post it in case it could help someone.

Taz’s picture

Status: Needs review » Reviewed & tested by the community

I rate the fix in #28. Worked for me.
http://drupal.org/node/1041706

This if statement should be patched in