The forums and forum-containers aren't showing posted topics. The topics are viewable, but as indepentent nodes. I can post lots of topics, but none will be linked to forums/containers. It's quite strange... I've shearched the drupal forum for some anwers but i found none... Please help me.. I'm using Drupal ver. 4.7...

Comments

marknewlyn’s picture

Hi

I am getting the same problem. I found one other symptom:
Old forum topics do show up but if I (or admin) edit them I get a revision error

user warning: Duplicate entry '6789' for key 1 query: INSERT INTO forum (nid, vid, tid) VALUES (6789, 13862, 15) in /includes/database.mysql.inc on line 120.

and then they no longer who up! Its something in 4.7.0-rc4+ as I was using the RC and then upgraded to fix problem - but alas its still there!

Don't know whats up but maybe the revision symptom will help an expert find it faster!!

Mark

marknewlyn’s picture

Hi

I have solved the problem I was seeing. I found that nid was the primary key in my forum table when it should be vid. Probably some update was missed.

What was happening was no new entry for the new revision was being created because that nid already existed (instead of a uniqure vid). So when an inner join was done between node and forum on vid nothing was returned.

To fix this problem just run:
alter table forum drop primary key, add primary key (vid);

Then you still have to edit each forum post, but then they get inserted properly and show up in the listing.

Mark