Hey, everyone. Am just starting to use Drupal 4.7, I've installed it on a test server here before launching a new site with it. So far, am very pleased, it's much better than I had imagined and all of the alternatives pale in comparison. I tried nearly everything this past summer, and wish I had just gone with Drupal first.

Anyhow...I've hit a minor snag with my site, and haven't been able to find anything on it anywhere (here or on Google). I setup the Drupal forums module, and created a couple of forums. My issue is that when anyone posts a forum node, it isn't contained in any of the forums (whether you specify the forum within the "new topic" link, or go into the forum first, then click "new topic").

I am using the flatforum module, but I disabled it, then removed the code, and it made no difference. I'm using the friendselectric theme, too.

My system is Mac OS X 10.4.7, but when the site is live, it'll likely be hosted on Linux (shared hosting). MySQL version is 5.0.22, and PHP version is 4.3.11.

If there are any other details that would be helpful to supply, please let me know and I'll post them. Many thanks for the help!!

Mike

Comments

vm’s picture

I've run into this when I was also using the categories module. confirm or deny whether or not you also have that module installed please.

flammable’s picture

I think so...I've got taxonomies enabled. Is there a fix, or are both modules just incompatible?

I'd like to use both, but if there's another categories module, I'd be willing to use that, if it'll work with the forums.

Thanks!!

flammable’s picture

Any ideas? I just disabled taxonomies, and the forum stopped working...as it's required.

Are you referring to taxonomies or another module?

vm’s picture

the categories.module from the repository. not the core module for taxonimies also by same name.

I"ve done my best to duplicate your situation, and that is the only way i can do so is when i use the categories.module without importing my already existing forum.

flammable’s picture

Okay...I went into CVS, and grabbed the categories module from the contributions repository. Put that into my Drupal 4.7.3 install, installed the taxonomies wrapper and all, and now when I go to forums, I get this error:

"No forums defined"

I set a container, and some categories, and set the container to apply to forum topics. And indeed, I can go to "create content" and create a forum topic, and the node is created...but when I go back to the forums, it still gives that error. The forum node is still orphaned, but now, I can only view it from the right sidebar, where I put an "Active forum topics" block.

So it's about the same as before, except, now I get an error, instead of seeing a list of forums and they all say 0 topics (though that's not the case).

Do I need to be using CVS for everything else, too? I can give you a list of the other modules I'm using, if that'll help.

Thanks for looking into this...I really can't wait to get this fully working, the community I'm building it for is pretty excited. :D

vm’s picture

The point of mentioning the categories module. was to insure that you werent using it. As this was the only combination that produced for me your problem. if you werent running it then installing it wasnt what should have been done. I wanted to eliminate it as the problem.

I would not suggest using CVS for everything only the latest releases. you can keep up with modules that are released by date, as a few modules are updated every day. so browsing them by date, helps you keep the modules you do run, updated to the freshest release.

as far as your forum problem is concerned. I'd upload another drupal installation, with "0" contributed modules except for flatforum. then i'd try building the forum to see if you can get it working. once working move on to see what exactly interfers.

flammable’s picture

Thank you, VeryMisunderstood! Upon rebuilding the site from scratch, I found that in administer --> categories, there's a forum vocabulary entry by default. When I first started building the site, I was going to use other forum software, so I must have deleted that. When I decided to actually use Drupal for the forums after all, it wasn't there...and that's probably why forum topics didn't go into the forums like they were supposed to (even though I enabled forums again).

Would be nice if it could easily recreate that...or even better, if Drupal had some sort of a self-healing system that allowed you to reset certain default entries. I just deleted the primary links, for instance, by accident (I was trying to remove it from the template). The only way to get that menu item back appears to be a clean install of Drupal, it would be nice to have a button to restore that.

Anyway, thanks again!! I hope this helps anyone else with the same issue.

flammable’s picture

Scratch that second paragraph, it appears you can take care of that in admin --> settings --> menus.

hanaichigo’s picture

I also have deleted the vacabulary "Forums" from
administer > categories > edit vacabulary menu.
After that I came to realize that the default word "Forums" and
forum post category have some relationship.
I made the vacabulary "Forums" again manually, but it does not work.
Would somebody let me know how to fix this problem?
If impossible, I have to install the backed-up older database file,
that that is the last thing I have to take.
Thank you in advance,
by the way I am not fruent english speaker, so if you have some difficulty
in my english, please forgive me.

vm’s picture

I'd suggest doing the same thing flammable did. set up a secondary drupal installation and re-insert what youve deleted.

The secondary installation will have the proper vocabulary, manually recreate it to get it back to where it was prior to deleting the terms.

hanaichigo’s picture

I have already re-installed drupal from scratch.
But thank you very much for your suggesting.

somebodysysop’s picture

I've got the same problem, but re-installing seems crazy since that could take hours to get back to where I am now, and I still might not discover why. Also, since Drupal is database driven, it stands to reason that there are certain database elements which need to be in place in order NOT to have the problem.

A better solution seems to be to find out the circumstances under which forum containers and categories are added to the vocabulary table automatcially (and/or what would cause this not to happen).

I am running Drupal 4.7. I have og, category, views. I've disabled and uninstalled taxonomy_access.

I am unable to post to any of my forums because the "categories" window does not display the available forums when I go to add a forum topic. This is because when I add forums or containers, they are NOT automatically added to the vocabulary table.

I installed a fresh copy of Drupal with og, category and views and do not have this problem, so apparently I did something to break the process.

So, again, under what circumstances does Drupal add data entered under admin>>forums to the vocabulary table? If broken, how does one go about reconstructing those circumstances?

jghyde’s picture

I had this problem and it went away after I disabled the taxonomy_control.module. This is a custom module, not to be confused with the taxonomy.module that comes with drupal core.

Local News Platform Built on Drupal
http://sanangelolive.com/

somebodysysop’s picture

Could not answer my own question as to what caused it, but figured out a way to fix, at least in my own instance.

First of all, the problem is caused because the system doesn't have the correct Forums Navigation Vocabulary ID number. This is the vid of the default "Forums" vocabulary that the system creates initially and handles the process of creating vocabularies and terms from administer>>forums entries. The system apparently stores this number somewhere, but where I have not discovered. What I did discover was how to recreate it if accidently deleted and Drupal doesn't do it automatically.

1. Used this php code to determine what, if any, the system believes to be the forum navigation vocabulary id:

<?php
$vid = _forum_get_vid();
print 'This is the result from _forum_get_vid() ' . $vid;
$vid = variable_get('forum_nav_vocabulary', '');
print '<br>This is the result from variable_get(forum_nav_vocabulary, ) ' . $vid;
?>

2. Next, if this number is NOT = 0 (theoretically, if it's equal to zero then Drupal will create it. See _forum_get_vid() function in forum.module). Then this is the number my Forums navigation vid needs to be. So, I create a Forums vocabulary (administer>>categories>>add vocabulary):

name = Forums
no description
no help
types = forum topic
hiearchy = single
required = checked

Save the new vocabulary.

3. Edit the vocabulary and vocabulary_node_types tables.
vocabulary table:
a. Change the vid to the number you get from _forum_get_vid() above.
b. Change the module field to "forum".
vocabulary_node_types:
a. Change the vid to the same number you edited into vocabulary table above.

Once I completed the above steps, my forums began working as before. What caused it to break in the first place? Dunno.

DCanfield’s picture

I've spent hours trying to track this down. Having never used the forums module before, I thought I was missing something in the way it was supposed to work.

Your solution fixed the orphaned records problem for me, much easier than a complete re-install. Thank you for taking the time to post your solution.

circus’s picture

Since my database contains the Vocabulary records as described above, am I correct in concluding, based on the other above posts, that I can not use the core Forums module if I am using the Categories Module?

I'm pretty sure I need the access control provided by the Categories module. Will I have to do without the Forum?

Are there other options? Is this going to be resolved with Drupal 5?

Ian Hargest’s picture

I, too, have inadvertently deleted my 'Forum' vocabulary. Today, I tried the php code snippet that you outline in step 1, and placed it in the root of my /drupal installation (with cron.php, etc.) but I get the following error when launching the code snippet through my browser:

Fatal error: Call to undefined function: _forum_get_vid() in /home/hargestc/public_html/drupal/vidfinder.php on line 2

I'm just a code dabbler, so if I've missed something, I apologize and and for more help.

I just recently started experimenting with drupal for my personal website, and have spent many hours setting up a dev version. At this point, if I can recreate the 'Forum' vocabulary with the correct vid, I'd rather do that than recreating the entire site with a full re-install.

You can see my current configuration here: http://drupal.org/node/97201

Any help would be greatly appreciated.

Thanks // Ian

somebodysysop’s picture

I found this by searching for a similar problem: http://drupal.org/node/55521

This recommends using:

$forum_vid = variable_get('forum_nav_vocabulary', '');

It could be that I've got an old, old version of Taxonomy. Also, I noted that the person got this error when forum was disabled.

Hope this helps.

Ian Hargest’s picture

Somebody -

Thanks for the reply. I did find that same information last night prior to posting my initial reply, but wanted to show what error I was getting with the original code. Here's what I've got now. Thanks for your help!

I've updated the php code as follows:

$forum_vid = variable_get('forum_nav_vocabulary', '');
print 'This is the result from _forum_get_vid() ' . $forum_vid;
$forum_vid = variable_get('forum_nav_vocabulary', '');
print '<br>This is the result from variable_get(forum_nav_vocabulary, ) ' . $forum_vid;

And still get an error:

Fatal error: Call to undefined function: variable_get() in /home/hargestc/public_html/drupal/vidfinder.php on line 2

Any suggestions as to what I might be doing wrong, or what I need to do differently would be appreciated.

Thanks // Ian

somebodysysop’s picture

You know, I never ran that program as an independant php file. I created a page in Drupal, set input type to "php", disabled rich-text, and put the code into the body of the page. Saved it and it runs, giving me the answer I need.

Try doing it that way, because from what I can tell, variable_get is part of the Drupal core system (http://api.drupal.org/api/4.7/function/variable_get), so there's no way you should be getting undefined function error.

Ian Hargest’s picture

Somebody -

I'll try that when I get home this afternoon, and will advise results.

(Keeping my fingers crossed :) )

Regards and thanks // Ian

Ian Hargest’s picture

Thanks so much for that PHP code!!! After putting it into a PHP posting on my drupal installation, I was able to get the necesary record number (1 in my case).

I then went, via MySQLAdmin and updated the records as you described, and you saved me from having to reinstall the entire site.

Regards // Ian

paulj2sj’s picture

I can post new forum topics, but they never show up on the actual forum. It keeps saying 0 posts, etc. However, the new posts do show up under the "Active Forum Topics" block. I followed the instructions a few posts back to no avail. forum_get_vid said it was 18.
My vocabulary_node_types table has an entry:
vid type
18 forum
my vocabulary table has an entry:
vid name description help relations hierarchy multiple required tags module weight
18 Forums 0 1 0 1 0 forum 1

I tried uninstalling the forum module, and then reinstalling it. Still same problem. No idea what to do at this point. What is even stranger is that i have the classified ads module also installed and when i create new ads, it does the same thing as the forum posts do. they just don't show up. it also uses the categories to maintain organization, so i would imagine that it has to do with the categories/vocabulary...i just don't know what.

any help would be greatly appreciated.

paulj2sj’s picture

Awesome. I got my forums working. Thanks for those links. I read through them a number of times, followed Jaza's specific directions *after* I had run the taxonomy wrapper patch of bdragon's. Will try out the classified ads module later.

Thanks again.

jonathanwinn’s picture

removed

jackspiv’s picture

Thanks so much for this (and SomebodySysop) for getting this right !! I've been fighting this for several days now.

FYI ... the fix mentioning putting the correct VID and forum topic did not work for me.

but when I replaced forum topic with the word "forum" to match the listing in the node_type table.

voilla!!!

thanks again.

steveparks’s picture

Thanks so much to SomebodySysOp for posting this solution - it ended long hours of going gradually mad!
cheers
steve

===
Steve Parks
Convivio - a digital services agency

http://weareconvivio.com

snav’s picture

My problem is the same as what paulj2sj was experiencing. I have an existing forum with about 4 posts that are viewable via the forum link. All new posts that are created by users are not visible in the forums. They are however visible by way of the 'Active Forum Topics' block.

I have applied the patch given in http://drupal.org/node/115693#comment-192976 . Perhaps I applied it wrong? I edited /mydrupalsite/modules/taxonomy/taxonomy.module and added the content of the lines that are followed by a '+' to the appropriate place in the given function.

I am not too sure on how to follow jaza's instructions.

"1. Install category, the taxonomy wrapper, and forum. "

Categories is installed and running by default in drupal 5.1 right? So I just skip that part. I'm not too sure what the taxonomy wrapper is, it appears there is nothing to install. I did disable and re-enable the forum module. No changes noticed. I did TRUNCATE TABLE `cache` in mySQL.

"2. Go to your site's administer -> forums page. The first time that you access this page, forum automatically creates a 'Forums' vocabulary (which then automatically triggers the taxonomy wrapper to create a corresponding 'Forums' containeri). "
"3. Go to your site's administer -> categories page, and verify that the 'Forums' container has been created.
Go back to administer -> forums, and create all of your site's forums and containers on this page, and not on the administer -> categories page (the word containers is used here in the forum module sense, not in the category module sense). "
"4.To create new forum topics, either go to create content -> forum topic, or click the post new topic link from one of your forums. "

Re-enabling the forum doesn't let me reset these options. My method of setting up the forums was the same as given in steps 2 & 3. When I first setup the forums, step 4 was working correctly.

How can I fix this problem without having to re-install the entire site again? I thought that applying the patch should have fixed things, either my method is flawed or my problem is somewhat different to what everyone else has been experiencing. Can someone plz help me out.. im going insane!!

vm’s picture

In reference to install category, Jaza means his module. Drupals category module is called taxonomy. Jazas contrib module is called Category. confusing eh?

I have no idea what that patch was supposed to do. however the wrapper is part of the category module and can be found in categories settings area in your administration area.

If you have no direct need for category, I'd drop it. No offense to Jaza meant, but in the end, there are many people installing it who don't have anywhere near a need for it and in turn are getting overwhelmed by the amount of settings that are needed to install it properly and maintain their original taxonomy modules.

edg’s picture

Thanks for posting this - it was a relatively easy fix in the end - although I was chasing my tail until I managed to track down your post. The problem occurred for me after I decided I wasn't going to use forums after trying them out, and I deleted the forum vocabulary. Then i changed my mind again - as you do - and when I turned the forum module back on I discovered the "orphaned forum posts problem". Thanks again.

www.iofilm.co.uk - Not a Drupal site yet!

edg’s picture

I was going to say that it didnt retrieve the forum containers but I found them...

www.iofilm.co.uk - Not a Drupal site yet!

Creech’s picture

Alrighty, well I have been messing with my website and trying every possible way to fix this, but nothing has worked. The forum is the main section of my website, so any help with this is greatly appreciated.

I'm running Drupal 5.7 with Taxonomy and the default Forums modules enabled. I can create forum topics fine and they show up in the "New Forum Topics" section but they do not show up in the forums. The site was working perfectly until I upgraded to 5.7. Since then I have not been able to fix this issue. I will gladly post any additional information, just let me know what to post.

I tried using several of the php snippets and figured out the forum vocabulary ID is set to 1 and I tried changing the default value in the database from 0 to 1, but I'm not sure I did it correctly. I tried it several ways but none of them worked. Am I doing something wrong?

Also, I can install a fresh copy of Drupal, but if it's a database problem then that won't do me much good because I'll need to copy the database to keep the 1000+ forum posts (right?). Thanks in advance!