First post ever, I hope I'm doing this right.

In the latest build, the 'Forums' breadcrumb is not shown in the forums view when the og_forum module is active. This did not occur with the build from June 29, 2007, which I have in a parallel installation of drupal.

when I'm in the forum view:
http://localhost/drupal/?q=forum

Breadcrumbs show only Home, (as they should)

however, in the view of a subforum:
http://localhost/drupal/?q=forum/56

Breadcrumbs show 'Home > Container Title', but not 'Forums' (which should be shown between them). This also is true when the element viewed is a container: only 'Home' is shown, not 'Home > Forums'.

On forum topics (nodes), breadcrumbs are displayed all right.

Comments

rconstantine’s picture

I'll compare the latest build against the one you mention. However, in my defense, I do have a comment in the code near the breadcrumb stuff that says something like "I don't know what I'm doing here so any help is appreciated".

Because the handling of forums vs. og_forums has merged, the breadcrumbs had to change. As you point out, they are a bit broken.

If you or anyone else knows how to fix them, I'm glad to make the change. Otherwise, it will be a week or two before I have time to get to it. I'm trying to finish a big module for something else. Once I'm done, I'll be making a couple of changes and then will release an official 2.0 version.

sebxian’s picture

I'm really new to all this, so I don't know how or if I should provide a patch for this or anything, but after a look into the code, the solution seems to be easy (but be warned, I also hardly know what I'm doing ;-) ).

The function theme_og_forum_display(...) contains parts that seem to be just copied from the core forum.module function theme_forum_display.

The following lines are in forum.module but missing in og_forum.module. If I paste them in the corresponding position, breadcrumbs work fine.

if ($tid) {
    $breadcrumb[] = array('path' => 'forum', 'title' => $title);
  }

The reason that the error did not occur in the older build is that the whole function didn't exist there, I guess the whole handling had been left to the core module there.

However, after the fix there remains a minor inconsistency in the breadcrumbs: The node display of a group forum topic contains a breadcrumb trace back to groups and the parent group, while the forum view will link back to forums and the forum container. But I guess that is part of a general issue: Should group forums be accessed from groups or from forums? -- or where should they link back to, respectively. This may be best discussed elsewhere.

rconstantine’s picture

Assigned: Unassigned » rconstantine

Thanks for catching that oversight. I'll see about making the change in a few days and posting it along with some other stuff.

As for the other handling of breadcrumbs, as I recall, there is actually a function toward the bottom of the file that is supposed to handle them. I think this is where my note about not knowing what I'm doing is. Feel free to play with it/look at other modules/compare/etc and report back here. I simply have not spent ANY time looking into it, so even if this is all new to you, THAT is new to me too, so it can't hurt for you to do the looking.

Thanks.

rconstantine’s picture

Status: Active » Fixed

Alright, just fixed this. It will be in the next release.

Anonymous’s picture

Status: Fixed » Closed (fixed)