When I go to /forum/x where x is a valid taxonomy term id, the category that corresponds with the term id is displayed as a forum, even when there are no forums on the site. I don't see the point of this, since forums are defined separately from taxonomy terms, so I figured it must be a bug in the forum module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klance’s picture

klance’s picture

I also noticed that when something IS a forum, and I go to /taxonomy/term/x where x is a valid forum id, it displays the forum as a category. It seems as though Drupal isn't differentiating between the two at this level.

pwolanin’s picture

The latter behavior would seem to be the expected one, since other node types in addition to forums can use the Forum vocabulary. See: http://drupal.org/node/70660

As for the former, I guess it's just a question of whether it's worth the overhead to check that a particular term is part of the Forum vocab before displaying it.

klance’s picture

If I remove the content type "forum" from my main vocabulary, since a "Forums" vocabulary is automatically created by Drupal, I can no longer view forums as categories, but can still view categories as forums.

As for whether or not it's worth the overhead of checking whether the term is a category or a forum, my only main concern is whether or not it's allowing anonymous users to view the titles of forums that have View and List disabled in Taxonomy Access Control:

http://drupal.org/node/74339

magico’s picture

Version: 4.7.2 » x.y.z

Still active.
The problem here is that the forum should really check if the "id" corresponds to a forum node type.

Liam McDermott’s picture

Version: x.y.z » 7.x-dev
will_in_wi’s picture

Status: Active » Needs review
FileSize
1.7 KB

Not sure what the right solution is to this bug, but here is one possibility. The patch checks that the currently displayed tid belongs to the same vid as the forums. If not, it displays a 404.

This does add a couple of database queries. I cannot think of any way of doing this without adding these queries. The question as stated above is whether the added overhead is worth it.

Anyway, I am trying to do my part to get D7 released that much sooner by fixing bugs. Would someone look over this patch and see if it is the right approach?

Thanks

Status: Needs review » Needs work

The last submitted patch failed testing.

will_in_wi’s picture

Reroll

will_in_wi’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

andypost’s picture

Marked as duplicate #513618: Taxonomy term mimics forum display when it shouldn't

Patch in duplicate issue seems a bit easy
Suppose drupal_access_denied should be redirect or drupal_goto to taxonomy/term page