From a fresh install (4.6) Drupal will create a new vocabulary for his forums named: "Forums".
It then puts the taxonomy id for this in the variable forum_nav_vocabulary using variable_set().

This action was triggered because the forum module did not get a response from variable_get() for this variable the first time.

When a user now removes the Forum vocabulary. He can still use the containers etc.. but all the forum topics he now creates cannot use these containers because they still use the old vid that is set in the forum_nav_vocabulary variable from the first set_variable call.

Maybe the forum page should not only check if the forum_nav_vocabulary value is set but also if it is still valid, so a new value van be set when the old vocabulary has been deleted.

I only took a quick look at the code, so maybe my story isn't 100% correct, but the behaviour for the end-user is the same.

Greetings,

Jacusah

Comments

greggles’s picture

Category: bug » feature

I feel that

1. the user should not delete the forum taxonomy - perhaps their should be new feature which prevents certain taxonomies from being deleted if a module depends on them
2. if the user accidentally deletes the associated taxonomy, making them manually edit/execute some magic sql/php to assign a new vocabulary doesn't seem overly burdensome to me

amanda’s picture

Well, I don't want to use the vocabulary. I want to have a single vocabulary for all content types on the site. Now my forums just don't work--though the forum node is actually created, I get this error:

warning: sprintf(): Too few arguments in /home/.../includes/database.inc on line 154.

user error: Query was empty
query:  in /home/.../includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /home/.../includes/common.inc:384) in /home/.../intranet/includes/common.inc on line 192.

Confident that this is related: I created some new Forums and Containers and then poked around in the SQL. In the variables table, I find this value for "forum_nav_vocabulary" -- i:5; but I don't have a vocabulary of vid "5". I want to use vocab 3. Just changing the value here isn't enough.

greggles’s picture

Just changing the value here isn't enough.

What happened after you changed the value?

magico’s picture

Version: 4.6.0 » x.y.z
liam mcdermott’s picture

Version: x.y.z » 6.x-dev
Status: Active » Closed (duplicate)

Marking as duplicate of #65984: Mark forum vocabulary as "protected" This has been fixed in Drupal 6.