Forum TABLE in the database is all blank,just seems not working at all!

luisfeng - February 23, 2009 - 09:27

I post new forum type node in the drupal forum, everything works perfectly! But the post fails to show in the forum.

I go to the phpmyadmin to check the Fourm TABLE, the TABLE is all blank, there is no record in the TABLE.

After I insert record to Forum TABLE manually, the post is then showing up in the forum..

INSERT INTO `lanyacom_nokiaplay`.`forum` (`nid`, `vid`, `tid`) VALUES ('535', '535', '189');

So what's the problem with THE Forum TABLE...

In admin/content/taxonomy

cog.rusty - February 23, 2009 - 09:49

In admin/content/taxonomy edit the "Forums" vocabulary.
Look in the "Content types"section. Is the "Forum topic"selected?

If this is not the problem, check these in the database:
http://drupal.org/node/365973#comment-1226871

Selected!

luisfeng - February 23, 2009 - 11:02

Forums was selected, and I check the database, all things are in the right status!
Actually, I've read so many topics that you had engaged. I've tried to reinstall the forum(9 steps) overall twice, but still don't work!

I've created serveral forum posts, but the Forum TABLE just keep blank, no records in it!
Even I disabled all the modules(not uninstalled), the problem still in it...

Thanks cog,rusty, you're awesome. :)

-----------------------
Join the community!

I hadn't noticed the "forum"

cog.rusty - February 23, 2009 - 12:33

I hadn't noticed the "forum" table before. A strange table. It seems to be empty even if the forum works correctly.

Here is a discussion I found:
http://drupal.org/node/231691#comment-762284

I tried to move a post to a different forum and selected to "leave a shadow copy" and only then an entry was added to the "forum" table.

Now
- The "term_node" table contains the node 2 times, one with the old forum tid and one with the new forum tid
- The "forum" table contains the node 1 time, with the new forum tid
- In the old forum I see "This topic has been moved"
- In the new forum I see the node.

So, the logic seems to work like this: If a node revision exist many times in the "term_node" table, only the one which also exists in the "forum" table and has the same tid is valid. The different tids are shadows.

Probably this could have been designed better. For example, they could have renamed the "forum" table to "forum_I_have_shadows" ;-)

------- Edited to add:

I found that the "forum" table has also another similar use. If you allow "stories" to the Forums vocabulary and you add a story to a forum by selecting a forum term (obviously the story can be tagged with many other terms), then an entry for the story is automatically added to the "forum" table.

I thought that "forum" table

luisfeng - February 23, 2009 - 13:18

I thought that "forum" table is just a connection of forum_type node with the forum (taxonomy)...
So my problem is that the forum table can't making that connection when I post new node in the forum automatically...

-----------------------
Join the community!

I thought that "forum" table

luisfeng - February 23, 2009 - 13:23

I thought that "forum" table is just a connection of forum_type node with the forum (taxonomy)...
So my problem is that the forum table can't making that connection when I post new node in the forum automatically...

This code can make that connection manually:

INSERT INTO `my_database`.`forum` (`nid`, `vid`, `tid`) VALUES ('xxx', 'xxx', 'yy');

-----------------------
Join the community!

No, the connection between

cog.rusty - February 23, 2009 - 14:16

No, the connection between the Forums vocabulary and the "forum" node type is in the tabe vocabulary_node_types, as I mentioned in the link in my first answer. It is just one line, which must contain the Forums vocabulary vid and the "forum" node type.

And the connection between the nodes and the forum terms is the "term_node" table.

The "forum" table is used only for nodes which are tagged with many terms, and contains only one of these terms which will be used in the forums hierarchy.

The record

luisfeng - February 23, 2009 - 14:03

The record "forum_nav_vocabulary" In the Variable TABLE is " s:2:"11" ". I know the "11" is the Vocabulary ID, but what is "2" considered?

-----------------------
Join the community!

Nothing important. 2 is the

cog.rusty - February 23, 2009 - 14:10

Nothing important.
2 is the length of the string "11".

I've got the answer... the

luisfeng - February 24, 2009 - 01:07

I've got the answer... the node_form_rearrange module cause the problem..

I find the answer in this thread: #358197: Forum Topics are not shown in the forum overview page

-----------------------
Join the community!

Thanks cog.rusty... ^^!

luisfeng - February 26, 2009 - 07:27

Thanks cog.rusty... ^^!

-----------------------
Join the community!

 
 

Drupal is a registered trademark of Dries Buytaert.