Posted by TwoMice on October 20, 2009 at 8:40am
| Project: | OG Forum |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | closed (fixed) |
Issue Summary
This function appears to run for every node returned by the og_ghp_ron view included on the group home page. As a result, it's rewriting the breadcrumb, repeatedly, for each item in the view.
Because of this, if the last item in the og_ghp_ron view is a forum post, the final state of the breadcrumb is what would be appropriate for that forum post, but not for the group home page.
My quick fix is to change this if() statement
if ($variables['type'] == 'forum') {to this
if ($variables['nid'] == arg(1) && $variables['type'] == 'forum') {May not be the most elegant fix; simply relies on the current nid to be at arg(1).
Comments
#1
I agree. Much better to check that $variables['page'] == TRUE or:
<?phpif (!empty($variables['page']) && $variables['type'] == 'forum') {
?>
#2
Patch attached.
#3
I'll get this committed to the development branch later today
#4
#5
Automatically closed -- issue fixed for 2 weeks with no activity.