I hope this is the right place ot post this. If not, I appologise for my transgression.

I picked Drupal for my next site.
So far it looks great, supposed to do what I need as far as features etc.

Problem is I can't get forums to work like they should. Yes, there are several bug reports on this.
There are many many forum posts on this problem. Lots of users are crying for help on this issue.

Personally it's holding up deployment of my site. I considered installed 4.5.x but really 4.6 seems like a huge leap forward and I'd rather start here.

So to this end, I'd like to try and come up with a solution. I'm not a php or sql brainiac. But I can make changes, do some logical deduction and with some assistance perhaps we can solve this problem.

So here's my observations.
Forums seem to not work with taxonomy. When you list forums, none of the terms or vocabulary with forums enabled show up in the forums list.
I think this might be the problem right here:

/**
 * Returns the vocabulary id for forum navigation.
 */
function _forum_get_vid() {
  $vid = variable_get('forum_nav_vocabulary', '');
  if (empty($vid)) {
    // Check to see if a forum vocabulary exists
    $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE module='%s'", 'forum'));
    if (!$vid) {
      $vocabulary = taxonomy_save_vocabulary(array('name' => 'Forums', 'multiple' => 0, 'required' => 1, 'hierarchy' => 1, 'relations' => 0, 'module' => 'forum', 'nodes' => array('forum')));
      $vid = $vocabulary['vid'];
    }
    variable_set('forum_nav_vocabulary', $vid);
  }

  return $vid;
}
<code>

Specifically: <code> $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE module='%s'", 'forum')); 

Won't this always fail to pick up a vocabulary since the module is "taxonomy" ?
I'm not smart enough to correct this code. I imagine it should have some like || 'taxonomy' && vocabulary_node_types for $vid = 'forum'.
(Really bad pseudo-code - I'm obviously not a sql or php guy like I said before)

This way when forums are listed (I hope) it when list those taxonomy that have forums enabled.

Second problem, and I am not sure yet where look on this one, but in the 'forum" table of the database, there are two fields, "nid" and "tid".
Well, nid seems to be filled out correctly, but tid is always a zero.
The same nid's are correctly written into term_node with the correct tid.
I don't yet know where this is being done (I've only been screwing with this problem for a couple man hours).

Can some one who knows a bit about php/sql give me a pointer or two? What's the syntax to rewrite that query above?

I think the tid problem is in the bug report here:
http://drupal.org/node/19562

I asked if anyone there could fix it, but I kept digging until i got to this point.

Comments

sas789’s picture

It seems you're on the right track. Unfortunately I am also ignorant of PHP/MySQL voodoo. So we'll just have to wait until some wise & generous soul provides a clue.

bobcat’s picture

Well I permantly blew up my site screwing with this.

I had imy site to the point where I was trying to build my forum structure when this problem cropped up. Considering how long this has been broken etc...... I decided to move on and give civicspace a try. It has some bugs too, but none that are a show stopper like this one is.

I'm looking forward to when this problem gets fixed. Drupal 4.6 seems to be alot better and lot more advanced. Just has a critical bug is all.

sepeck’s picture

Civicspace is Drupal 4.5 with additional modules installed. You could start with 4.5 and all the modules it has, then when your tests deem 4.6 done enough, you would just need to follow the straight forward upgrade path.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

sas789’s picture

Yesterday I did just that, after struggling with forums in 4.6.0 for several days. Oh well. One day I'd like to upgrade to 4.6, but only once the forums are fixed.

Thanks for the suggestion.