After updating to Drupal 6.9 (or it might have been one of the other 6.x updates, but 6.9 is where I am now). New forum topics are not displayed in the forums. They're published and display fine on the front page or by direct address.

Tested on two sites in the multisite, one with a fresh install of forum and one with existing forum content. Both sites have exactly the same problem.

Any idea what could be going on? Everything looks right in the database (vid and tid and all that match up in the relevant tables). Do I need to create a view or something?

Thanks in advance for any direction.

Comments

vm’s picture

Component: Documentation » Miscellaneous
Status: Active » Fixed

http://drupal.org/search/node/forum+threads+not+showing are similar threads that have the same topic. I didn't have time to read through them to locate a firm answer. It seems this type of issue has been around for awhile so it doesn't seem relaetd to the upgrade to 6.9 but rather a problem with setup or possibly a contrib module. Like those users, you may get better traction by using the forums.

for now marking as fixed, if that link of similar threads doesn't help feel free to reopen but I've no direct experience with the issue to help. The community at large will be in a far better position to help you.

CharlieHipHop’s picture

I did try that, of course. Nothing worked. I do think it has something to do with the way it's set up. Does Forum need a View?

vm’s picture

no forum does not by default need a view. I've used the forum on quite a few sites and it just works. by enabling. Creating a container, creating forums and submitting topics.

could you grab a screen capture of your taxonomy set up for forum and link here please.

vm’s picture

Status: Fixed » Postponed (maintainer needs more info)
CharlieHipHop’s picture

Thanks again for your help, and I'm sorry if I'm an idiot.

No need for screen capture. On the site on which I did a fresh activation of Forum, I have a container called Forums that holds type of Forum topic. Under that, there is a list of categories, which are forum topics (there's only one now -- "test"). When you go to the forum, you can see that it's there, and it even shows how many posts and replies there are.

http://walkingtourny.com/forum

Then when you go into the forum, you get a list of... nothing. The permissions work -- the "post new topic" link shows up for the right roles. You can post a topic and navigate to it directly, but it doesn't show up in the list.

http://walkingtourny.com/forum/24

I'm really scratching my head because all the keys in the database match up, and the taxonomy seems correct.

Thanks again.

vm’s picture

it would have been a benefit to see the taxonomy.

My guess is you don't have any actual forums.

when forum module is enabled there are no containers and no forums.

in adminsiter -> forums

we set up a container called projects
parent = root

we then add a forum called music
parent = projects

you now should be able to submit posts to the music forum which is in the projects container.

my guess if that you are submitting your forum threads to containers instead of actual forums. I can't verify this because I can't see the forum taxonomy set up and anon users dont have access to post on your site.

CharlieHipHop’s picture

StatusFileSize
new20.95 KB
new20.7 KB
new16.87 KB
new25.03 KB

I really think everything is technically set up correctly. It was working fine on the other site. That's a headache in itself -- saving the content from that forum.

Attached are the screenshots, and I gave anonymous users permission to post to the forums there. I even gave you administrative privileges over the forums.

Thanks again for your help with this.

vm’s picture

the first thing that jumps out at me in http://drupal.org/files/issues/Forums_taxonomy_screen.jpeg

if you have two forums there not one container and one forum. this can be seen in the edit links. in mine project is a container thus it says edit container

I'd also for the time being avoid nameing containers and forums "forum or forums"

I'd like you to do me a favor

create a single container called project with the parent = root
create a single forum called music with the parent = project

If you want me to go into your install and do it that is fine though that won't really teach you much. My feeling here you aren't inside a container.

vm’s picture

I even gave you administrative privileges over the forums.

if you sent the credentials by contact form here on drupal.org I can't get it until I get home from work. 5:00pm EST

CharlieHipHop’s picture

I didn't send any credentials -- just allowed anonymous users to administer it for now since it's not working anyway.

I created the container and forum as you requested -- the problem persists.

Thanks again.

vm’s picture

ok, well something funky is going on here because your containers are showing up as forums and that is the problem.

I am also presented with this error upon creation of a container:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: INSERT INTO xmlsitemap_node (nid, last_changed, priority_override) VALUES (36, 1232475760, ) in /home/chucklin/public_html/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 126.

to go any further,

I'd need to know exactly what version of Drupal is in use and the list of contrib modules in use. According to your CHANGELOG.txt file you are using Drupal 6.7. I"d update to Drupal 6.9 to insure you have all bug fixes and security releases and to see if it helps get beyond this issue. What I can state for sure is that on my sandbox site with Drupal 6.9 and no contrib modules this problem with containers showing up as forums does not occur.

This tells me either its a bug in the core version you are using or a module that is somehow interferring.

CharlieHipHop’s picture

It is 6.9 -- I just didn't update CHANGELOG.txt.

I'm pretty sure the problem is with Views2. That module has given me more headaches than beer has!

vm’s picture

:scratching head:

I use view2 on almost every site I build without issue.

Looking at the issue queue for sitemap there seems to be something going on that the developers are trying to narrow down. Beyond that your error doesn't say anything about views2 unless sitemap and views2 are clasing in some way. which is possible. I don't use sitemap so I can't comment any further on that.

vacilando’s picture

Same problem - I've upgraded from D5.15 to D6.9 and forums don't show. I have found that the forum vocabulary ID of the D6 installation is different from the forum vocabulary ID in D5 -- but why, and how to fix it? See full details at #367911: D5->D6 created new forum vocabulary and the forum is empty

Thanks for any hint; this is a severe problem - and a mystery!

sabalaskey’s picture

This apparently is not related to an upgrade. I installed a new 6.9 site with a small number of add-ons. Nothing fancy was added, such as Organic groups, etc. I do have Views 2.2 running.

I enabled the module, then went to the administer forum menu and made a container called Forums. Then I added a forum underneath that. I can post articles, and they show up fine on the recent posts view (tracker), on the latest forum topics block, on the front page (as programmed). But clicking on the forum itself from the system-supplied forums menu link provides no threaded displays at all - just nothing. The path is "forum/301" where 301 is the category node for that forum. When I click the "forum" menu path, the list of forums (all two of them) shows up just fine.

Perhaps there is another clue. I went to the Categories menu and there is the Forums container. When looking at the categories within that container, there are two (for now). The text says "Forums is a single hierarchy container. You may organize the categories in the Forums container by using the handles on the left side of the table. To change the name or description of a category, click the edit link next to the category." I do not have forums in forums, so maybe that is OK? The depth of the container is 0. Should that be something else?

Since this is a common problem based on posts here, is there perhaps some module conflict with Views (2.2) or Category (beta1)? I noticed that I had a quirk using taxonomy manager which broke ("you can't have menus on multiple hierarchy nodes") the automatic menu option on the Category module container nodes. Perhaps there is some strange interaction here as well. As it stands, the Forum feature in 6.9 is practically inoperable.

I am running Fedora 8 Linux, with PHP 5.2.6 and MYSQL 5.0.45, Apache 2.2.9.

Regards, Bruce

mitchell’s picture

Project: Forum Package » Drupal core
Version: » 6.9
Component: Miscellaneous » forum.module

moving to core

Anonymous’s picture

Version: 6.9 » 6.13
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

The problem is, nothing is ever inserted in the {forum} table:

<?php
function forum_nodeapi(&$node, $op, $teaser, $page) {
...
    case 'insert':
      // Let's see what's in $node->tid
      drupal_set_message('tid: ' . $node->tid);
      if (!empty($node->tid)) {
        db_query('INSERT INTO {forum} (tid, vid, nid) VALUES (%d, %d, %d)', $node->tid, $node->vid, $node->nid);
      }
      break;
...
}
?>

We have a $node->taxonomy array, but $node->tid is empty and the INSERT is not executed.

I applied the patch from #422218: $node->tid can get the wrong tid if a forum content type has additional vocabularies which references some re-rolling re. the {forum} table that chx has done, but my overview pages at /forum/[tid] still fail to list forum topics, so perhaps some more re-rolling is necessary.

(Manually INSERTing tid, vid and nid in the {forum} table fixes the overview page and topics are listed correctly.)

Anonymous’s picture

I traced the missing $node->tid back to $op == 'presave' and managed to fix my site by changing $node->taxonomy to $node->taxonomy[$vid] on line 253.

<?php
function forum_nodeapi(&$node, $op, $teaser, $page) {
...
    case 'presave':
...
        foreach ($node->taxonomy[$vid] as $term_id) {
          if (in_array($term_id, $forum_terms)) {
            $node->tid = $term_id;
          }
...
}
?>

The original code assumes that $node->taxonomy is an array of tids, whereas for me it's an array of arrays, keyed by vocabulary ids.

jvieille’s picture

Version: 6.13 » 6.14
Priority: Normal » Critical

Edith,

You made my day!

I was really stuck there
http://drupal.org/node/609456#comment-2175854

I set to critical, as this really make Forums unusable. It may solve the too many issues that pop up for years.

Can it be committed for the next Drupal release?

CharlieHipHop’s picture

Thanks so much~!

gpk’s picture

@18: from examining a node with devel.module it appears that in D6 $node->taxonomy is actually an array of taxonomy term objects, keyed by term id (not vocabulary id). The line you have altered was clearly wrong, but it should probably be changed to something like
foreach($node->taxonomy as $term_id => $term)
The line underneath at the bottom of the presave section in http://api.drupal.org/api/function/forum_nodeapi/6
$node->taxonomy[] = $old_tid;
also looks wrong, since this adds a numeric term id (instead of an object) to the $node->taxonomy array, and doesn't set the key properly (which should be the term id).

To move this issue forward I suggest you try correcting these problems and then turning them into a patch http://drupal.org/patch/create.

Anonymous’s picture

In this instance $node->taxonomy is not keyed by term ids. That's precisely the problem. Unfortunately right now I have no time to investigate further, and I see no point annoying the maintainer with a half-baked patch.

gpk’s picture

In this instance $node->taxonomy is not keyed by term ids.

Ah, OK, this will need further investigation. From what I can make out the 'taxonomy' property of the node object is created in http://api.drupal.org/api/function/taxonomy_nodeapi/6 for case $op = 'load', so quite how a vocab id can get in there I'm not sure!

MarnitaM’s picture

I am struggling with the same issue, using Drupal 6.13. If a user clicks "Post new Forum Topic" the topic appears under Administer/Content as new content, but does not show up in a forum until an administrator reassigns it to a particular forum through Admin/Content.

Users don't have the ability to assign to a particular forum. Should they?

I have a forum container with several forums inside. Doesn't matter if user clicks on "Post new Forum topic" from the container or from inside the forum.

I have Taxonomy Access Control and Forum Access enabled, however the Forums Container in question is open to all authenticated users.

stegri’s picture

This is really frustrating, anyone had any luck with this issue? I'm using version 6.14, is there another earlier version where this is working?

I would like to have the topics displayed in the forum part, not the "active forum topics"-block.

stegri’s picture

OK, I found the solution for me. I looked at the SQL queries in forum.module starting from line 952 (sql and sql_count) and found out I didn't set any multilingual support for the created topics. After changing that I was able to see the topics in greek and swedish respectively.

But here is the thing, I wanted to see all of the topics in all languages at once (not having to switch between). Since I couldn't find any setting for that (I'm sure there is a trick), I just droped the db_rewrite_sql function and used the sql statement as is. A little ugly, but it works.

jvieille’s picture

The change in #18 now breaks something.
New topics are created, but don't appear again in the forum view, I get this error:
warning: Invalid argument supplied for foreach() in /home/controlc/www/modules/forum/forum.module on line 254.
when creating a new topic
The table "forum" does not contain an entry for this post.
Reverting the change #18 resumes to the correct behabiour... (for new posts - still impossible top recover failing posts)

Stegri: what did you do exactly? There are no lines after 952 in forum.module (D6.14)

Where ar we now?

Thanks

tjmoyer’s picture

Version: 6.14 » 6.16

For me $node->taxonomy in forum.module's forum_nodeapi (case: presave) is fine. But when I print out the $tree array when logged in a general user posting, only 4 out of 200 some containers and forums show up in the tree. It seems that somehow something is stripping out most of the terms in the vocab's tree. I made sure it was referencing the correct vocabulary id (1). I don't see anything in taxonomy_get_tree() that would limit what it returns based on user or anything else.

When I go to another page and call the same function and print out the results (still as that user), I get the full tree.

So what seems to be happening is that while the forum term id is there, it chokes in the if (in_array($term_id, $forum_terms)) check since taxonomy_get_tree didn't return the correct results, and $node->tid is never set.

Any ideas why?!?

I could force the issue and load the term into the $forum_terms array, but that doesn't solve the initial issue, which could potentially cause other unforseen issues.

tjmoyer’s picture

Quick follow up: it looks like the only forums taxonomy_get_tree is returning are non-og forums. The rest are all og_forums.

tjmoyer’s picture

For me it turned out to be an issue with og_forum. Where it rewrites the sql for selecting terms in a taxonomy to check against, it failed to allow for public og_forums when a topic is initially created. See my patch at http://drupal.org/node/651672#comment-3813348 for details and the patch.

Hope this helps as least some of you.

kenziem’s picture

Version: 6.16 » 6.19
Category: bug » support

I'm seeing a similar trouble with 6.19.
If you click on the RSS icon then you can see that the topics do exist.
I do not have access to shell or the mysql tables.

OG And Category are not installed.

larowlan’s picture

larowlan’s picture

We've found a bug how the forum module's locks down your ability to change aspects of the forum vocabulary and terms.
This code is supposed to prevent containers having multiple parents, which in turn affects how the $node->taxonomy data is composed.
The issue is here #10566: Forum can not appear in multiple containers.
Without the patch there you can modify your forum vocab/terms to allow them to have multiple parents - which may be the cause of this issue.
Please edit your vocab to set the hierarchy flag and edit your terms (containers/forums) to ensure they don't have multiple parents.
Then apply the patch at #10566: Forum can not appear in multiple containers and see how you go.

larowlan’s picture

Priority: Critical » Major
Status: Active » Postponed (maintainer needs more info)
Steve Dondley’s picture

I found that the "Taxonomy Role" module was the culprit. Turning it off fixed everything.

cweagans’s picture

Priority: Major » Normal

Support requests are never major or critical.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

I believe this is fixed? It can be marked back to active if it is still open.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.