I've seen a LOT of posts and discussion about this problem but no answers at all. HELP!

I have several sites running 4.6.1 where the forums work.
I have ONE site where they don't.
The ones that work were all upgrades from 4.5.2 and the one that does not was a fresh install.

Therefore, I conclude that something is wrong in the database but am clueless as to how to fix it.

Here is the problem: I have a taxonomy vocabulary named "Forums" that is associated with 'forum topics' and with some terms added. When I go to /admin/forum none of those topics are listed as was the case with 4.5.2. If I go to /forum and try to add a topic, it does not show up in the forum listing. Similarly, if I add a forum topic via create content, it also does not show up in the forum listing.

But if I post an item linked to a forum topic it does show up in the active forum topics list. So the item is recognized as a forum item. But /forum shows nothing.

gil

CommentFileSizeAuthor
#13 term_urls.patch2.75 KBdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richardcanoe’s picture

You beat me to it!

I was about to post this as a bug, since this seems to be a common problem which has not seriously been addressed since it was first raised.

I have now upgraded 6 sites from 4.6.0 to 4.6.2 in an effort to resolve this problem, howver this has had no effect.

One site running 4.6.0 works fine
Others using 4.6.2 do not.

I have tried using new/clean databases and stripping out all but required modules (ie node, comment, taxonomy)

To replicate:
go to administer -> categories -> add vocabulary
Create vocabulary called Forum and select forum topic as type.

goto /forum 'No forums defined'

OK so go to administer -> forums & create a forum
From create content -> forum topic there is no option to place content in the created forum

I have had a look but can't figure whether the problem is in the taxonomy or forum module

Capnj’s picture

Looking at the database, in the forum table the fields NID and TID apparently are NODE ID and TAXONOMY ID. In the database where the forum is working, there are nid|tid pairs. In the one where not working, the TID is 0 in every row. So the correlation is simply not getting there when a taxonomy term is entered. I'm going to enter some manually and see if I can re-establish the forum setup that way.

Nope ... that's not the answer. Don't know enough about the database scheme to play with that.
Whole forum module seems messed up. Clicking on forum, then 'active forum discussions' gives you all recent posts w/o discriminating on forum types.

This is for smarter people to figure out ....

gil

Capnj’s picture

All of this is the same in 4.6.2 as well.

gil

Capnj’s picture

Bump Bump
Is anyone looking at this issue?

gil

Kenrick’s picture

You might try looking at the "variable" table.
The row with name:
forum_nav_vocabulary
will have a serialized value entry like:
i:X;

The "X" will be a number that should match the vid field in the "Vocabulary" table that corresponds with your Forum Topics. If these got mucked up you could try manually making them match up in the database, by either changing the X "variable" in or changing the vid in "vocabulary".

kenrick

Capnj’s picture

Version: 4.6.1 » 4.6.2
Priority: Critical » Normal

Eureka! That was it. Many thanks to Kenrick for pointing to the solution.
Only problem is, how did it get changed? In my case the value was '4' and should have been '6' instead. I don't even have a vocabulary with a vid of 4 --- my guess is that I once did and deleted it after it was assigned as the forum topic vocabulary and upon deleting it, the variable table did not get updated even when a new vocabulary was assigned. Just a guess.

I'm lowering the priority, but leaving as a bug because that "mucking up" should not have happened.
Also marking as 4.6.2 because it still exists there.

gil

moshe weitzman’s picture

I was just bitten by this too ... Seems to be that the forum table is pure cruft and we can get rid of it.

moshe weitzman’s picture

this script will fix the missing/incorrect rows in term_node table.

include_once 'includes/bootstrap.inc';
include_once 'includes/common.inc' ;

$sql = 'SELECT * FROM forum';
$result = db_query($sql);
while ($row = db_fetch_object($result)) {
  $sql = 'REPLACE INTO term_node (nid, tid) VALUES (%d, %d)';
  db_query($sql, $row->nid, $row->tid);
  $i++;
}
die("done $i");
coloma’s picture

Jose Reyero’s picture

I think the big problem creating many of these small related forum issues is duplicating the taxonomy administration functions in admin/forum. Then someone can edit these same categories in categories administration really messing it.

IMHO, the solution would be getting rid of these forum admin pages, or most of them, and just keeping some checkboxes for 'which vocabularies contaning forums do you want to be shown in the /forum page'. Please lets trim down forum module and avoid duplicated functionality.

sethcohn’s picture

Version: 4.6.2 » 4.6.3

Bump.

The term_node versus forum table (both must be set correctly) is still biting people.

See http://drupal.org/node/32805

Is it possible to fix this easily?

kbahey’s picture

I had this same problem on another site. The site has been up on Drupal for almost two years, starting with (I think) 4.4 or so.

The forums have been enabled on that site, but never used. When I enabled them now (4.6.3), it was showing the normal vocabulary, not a specific forum vocabulary.

I did some research in the variable table and found that forum_nav_vocabulary was set to "i:1;". Creating a new vocabulary called forums and setting that variable to "i:2;" got things working correctly.

drumm’s picture

Version: 4.6.3 »
Assigned: Unassigned » drumm
Status: Active » Needs review
FileSize
2.75 KB

I found some code laying around on my computer to fix that.

breyten’s picture

neil is looking at it soon ;) the static stuff relates to caching, but might also introduce a bug when saving and then reloading a term. That's the theory, at least.

drumm’s picture

The extra caching is on vocabularies. It works fine for saving one of those.

drumm’s picture

Status: Needs review » Reviewed & tested by the community

Sure, lets say this is ready to commit.

breyten’s picture

Agreed.

Steven’s picture

Status: Reviewed & tested by the community » Fixed

I'm not 100% sure about the separate hook, but I suppose it makes sense because this is only invoked on the owning module of the vocabulary rather than all modules.

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)
valou’s picture

Version: » 4.7.0-beta1
Assigned: drumm » valou
Status: Closed (fixed) » Active

Hello.

I have the same problem. I post a item in my forum and in the forum list there is nothing.

There is a link of my mail in the forum drupal:
http://drupal.org/node/50719

Thank you.

Valou.

chrisd’s picture

Version: 4.7.0-beta1 » 4.7.0-beta5
Priority: Normal » Critical

This is still alive in Drupal 4.7 Beta 5.

From a GUI point of view, no correlation, even possible, between Categories and Forums/Containers.

My guess it that we are missing a "category" selection list in the Forum editor screen.

Forums editors simply offer the following fields (no category selection possible):
Forum name:
Description:
Parent:
Weight:

Containers editors simply offer the following fields (no category selection possible):
Container name:
Description:
Parent:
Weight:

I raised this to critical. No forums support in Drupal 4.7 seems like a big deal.

Thanks,
Christophe

dopry’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

@chrisd, could you please elaborate on what you are experiencing in new issue.

@everyone, This issue had been previously closed. Please do not reopen issues against older versions of drupal against the current head or beta. Please create a new issue that describes the bug you are experiencing and how to reproduce it. It will help interested developers fix it.

urbanfalcon’s picture

Version: 4.7.0-beta5 » 4.7.2

After the upgrade to 4.7, I found that I was also missing the category dropdown. Without that, the forum category variable in the URL was passed through to oblivion and none of my topics would display. The solution was found at the database level:

UPDATE `vocabulary_node_types` SET `type` = 'forum' WHERE `vid` =##;

Of course, the vid has to match the actual vid from the vocabulary table of the database. So a little bit of investigation is required, but in the end this did solve my problem of disappearing topics. I'm not re-opening this issue, but I did want to follow-up for the sake of documentation.