Drupal’s Organic Groups messing with my breadcrumbs
Problem: In my Drupal setup, I’m using Organic Groups (OG) and Menu Breadcrumb (MB). OG replaces Drupal’s breadcrumbs with its own which have no relevance to the structure of my site.
Solution: To “fix” this, I’ve changed the offending function,
og_get_breadcrumb
in
og.module
(line 1508 in 6.x-1.0-rc7), to simply return
drupal_get_breadcrumb()
.
Discussion: This is far from an ideal solution, and will break with every OG update. A better solution would be to have the MB
init
function (which sets the breadcrumbs) called after OG does its magic, so that MB’s breadcrumbs overwrite OG’s instead of vice versa. Unfortunately, I don’t know how to make that happen.
The difficulties I’ve encountered here may reflect the poor state of Drupal’s breadcrumb system rather than issues with OG and MB themselves.



Thanks for writing this article. It has been referenced here: http://drupal.org/node/407578 (which suggests commenting out all instances of ‘drupal_set_breadcrumb’ in og.module is the “better” solution)
I agree that finding a way to call Menu Breadcrumb’s breadcrumb setting function AFTER Organic Groups functions would be great… and require not hacking og.module…
If anyone can help please comment!
- Thanks