This issue lacks a description, but I figure it concerns the same issue I was having:
It is impossible to use Block Visibility rules on nodes mapped by node_breadcrumb. This is true for the include/exclude paths and the PHP condition.
The reason is that the module changes the value of $_GET["q"]. In effect it fools Drupal's menu system in thinking it's actually showing a different page.
So when you try to determine the current node, it returns the node of the page it is attached to - not the node itself.
I could not wait for a general fix, so I hacked one myself.
Open the file node_breadcrumb.module and do the following change
function _node_breadcrumb_set_location(...) {
$path = $_GET["q"]; // <-- add this line to store current path
/* Normal code goes here untouched */
$_GET["q"] = $path; // <-- add this line to restore current path
}
it is still overwriting $_GET['q'] to be the last breadcrumb path. is that a by-design thing? it's turning up as a problem all over my theme code, which does things based on the current path. scratch that - i didn't realize that dev was older than the beta releases.
Comments
Comment #1
dynamind commentedThis issue lacks a description, but I figure it concerns the same issue I was having:
It is impossible to use Block Visibility rules on nodes mapped by node_breadcrumb. This is true for the include/exclude paths and the PHP condition.
The reason is that the module changes the value of $_GET["q"]. In effect it fools Drupal's menu system in thinking it's actually showing a different page.
So when you try to determine the current node, it returns the node of the page it is attached to - not the node itself.
I could not wait for a general fix, so I hacked one myself.
Open the file node_breadcrumb.module and do the following change
I hope someone finds this useful!
Comment #2
edhel commenteddynamind, this code fix block visibility rules, but we lost menu location of nodes
Comment #3
edhel commentedfixed in beta3
Comment #5
brad.bulger commentedit is still overwriting $_GET['q'] to be the last breadcrumb path. is that a by-design thing? it's turning up as a problem all over my theme code, which does things based on the current path.scratch that - i didn't realize that dev was older than the beta releases.