Hi,

I have re-posted this here (from the 'Converting to Drupal' forum) because I think it's more relevant here. I'm sorry but I couldn't delete the other post.

I searched for similar topics to this and couldn't find anything which helped.

We've just successfully ported a postnuke (.723) website to Drupal (5.1)... almost. We have all the users, news items, comments, forum categories, forums and ALL of the forum posts. Most are displaying in the right sequence and all the right message content. Unfortunately a number of posts (in each forum) will not display. That is, they are in the Drupal database (you can search and find them) but they are not displayed in the forum (any forum).

I've compared the records of each database (postNuke and Drupal) and they messages don't contain any dodgy data and to all intents and purposes, seem like any of the other messages that are displaying correctly.

I've estimateld that between 5% and 10% of the messages are missing from the forum listings. I am very confident that the data was transferred from the PostNuke database successfully to the Drupal database. I think this is a Drupal forum configuration issue.

Background and example:

The PostNuke forum was a pnphpbb2 module of PostNuke. We adapted a script that was on this site and everything else has moved across without any problems (we fully intend to post the migration script here once we have successfully migrated the content).

Example of the problem.

A message entitled "That's Good Soup" is in the old PostNuke 'General Sci Fi' forum (about 20 posts down) here:
http://www.sadgeezer.com/html/phpBB2+viewforum-f-1-sid-16e5f44512853a5dd...

It's not an unusual or complex message. See for yourself here:
http://www.sadgeezer.com/html/phpBB2+viewtopic-t-5606-sid-16e5f44512853a...

On the new Drupal site (theme not ported over yet) you cannot see the message in the 'General Sci Fi' forum here:
http://sadgeezer.org/?q=forum/45

But you CAN see it if you do a search for 'Good Soup':
http://sadgeezer.org/?q=search/node/good+soup

You can click on the link and it opens the message up and even tells you that it's posted in the right forum!!! See Here:
http://sadgeezer.org/?q=node/5991

The forum message and subsequent comments were successfully transferred to the Drupal site but will not display in the forum.

I notice after counting all the posts in a particular forum that the message counter includes the forum messages not displayed and the last couple of pages in a forum are usually empty (as though Druplal knows that it should be displaying some forum posts but .... doesn't).

Strangely, if I search for the message and add a comment, the comment is correctly appended and the message is correctly displayed and promoted to the top of the forum (as you would expect). NOTE: Please don't do this with the example as it will spoil it for others reading this message.

Stranger still, if I go and delete the comment, the topic and comments will then be displayed in it's correct placing (about 20 posts down the forum listing!! What's up with that?!

We've tried everything to work out what the problem is but we're completely stumpted! It would be impractical to go through and add and delete comments from the missing posts (around 5000). Any ideas how we can get the rest of the 'hidden' posts to appear?

Comments

SadGeezer’s picture

We think it's definately something to do with the message rather than any subsequent comments, but when doing a before and after comparison, the record dosn't seem to have changed.

Any ideas on what we could try to identify the problem?

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

Quint’s picture

Sounds like the database has counters that needs to be updated or re-indexed.

Here are some things to try ...

Find a container/forum with missing posts and go into Content Management >> Forums: go into the container and forum and re-save them. See if the missing posts appear. Try changing or re-saving the settings too.

Try turning off anonymous access to forum. Try to view forum as anonymous. Log back in and turn anonymous access back on.

You might have to visit update.php

Turn off cache. (under 'performance')

Turn the site off then back on (site maintenance)

Disable the forum module then turn it back on.

Quint
Motorcycle News

Quint’s picture

Maybe running cron (Logs >> Status Report) might do some good.

Quint
Motorcycle Forum

SadGeezer’s picture

Thanks very much Quint for your advice. I tried each one with details below:

>>Find a container/forum with missing posts and go into Content Management >> Forums: go into the container and forum and re-save them. See if the missing posts appear.
The missing post didn't appear. It did appear at the top of the forum when I added a comment. When I deleted the comment it still appeared (in the right order).

>>Try changing or re-saving the settings too.
I changed the forum setting (renamed one of the forums) and resaved the settings, but posts didn't appear.

>>Try turning off anonymous access to forum. Try to view forum as anonymous. Log back in and turn anonymous access back on.
I can't actually turn off anonymous access to the forum (not via admin>user>access at least). I accessed the page anonymously then logged in but this didn't show the posts.

>>You might have to visit update.php
I tried to run this but got a page not found error (might be because my Drupal friendly ISP has taken it off). I'll dig a bit further and report on the outcome.

>>Turn off cache. (under 'performance')
It was already disabled. I turned it back on and played around a while then turned it back off. I was still unable to see the missing posts.

>>Turn the site off then back on (site maintenance)
Posts still didn't appear.

>>Disable the forum module then turn it back on.
I disabled the forum Module and then turned it back on but the posts didn't appear.

I'm hopeful of the update.php script as that seems to go through all nodes and make sure they are stored in the correct way (saving and re-saving as it goes).

Any other suggestions would be a great help.

I'll also post the code snippet that was used to import the files from my old site at sadgeezer.com to the test site at sadgeezer.org. Maybe that will shed some light on this.

Thanks again Quint, for your consideration.

Regards,
Tony

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

Quint’s picture

You might want to make this 'true' when you run it.

ini_set('display_errors', FALSE);

Quint
www.Shalla.Net

SadGeezer’s picture

Depressingly, update.php ran fine without any errors but the forum posts are still missing.

I think the next step is to post the script snippet (I say snippet, - it's a big script!). Hopefully that will shed some light.

In the meantime, I'll see if I can do anything more to identify the record changes before and after it has been updated (ie. while is invisible and after it takes it's rightfull, visible place in the forum).

Thanks again for your consideration.
Saddy.

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

SadGeezer’s picture

I noticed in the forums, that its as though Drupal knows that there are a lot of missing posts. The forum counts the messages and allocates enough pages to display them (the right number of topics are displayed on the main forums page) but the last few pages of the larger forums are usually empty of posts.

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

Quint’s picture

Are the missing posts only at the end? Is there some cutoff date?

Quint’s picture

You know ... now that you bring it up, Right here on Drupal.org, under _ My Account >> Track _ I have a blank post at the end. It says:

Anonymous (not verified) 0 37 years 25 weeks ago

Which puts it around Jan 1, 1970. I don't think I've been using Drupal this long. :P

Quint

SadGeezer’s picture

I get that if I checkout 'My recent posts'

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

SadGeezer’s picture

No, that's the strange thing. It seems completely random.

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

SadGeezer’s picture

This is the code that was used to import the data from a pnphpbb BS to the Drupal Forums.

As I said above - EVERYTHING has worked very well except for a few missing posts (which are in the database (on Drupal) but missing from the diplayed forum message listings).

Any help with what could have gone wrong would be much appreciated.

# start pnPhpBB stuff
# Written by Feodor (feodor [at] mundo.ru)
#
# Modified for drupal 4.5.2 and phpbb 2.0.11-2.0.13
# by Alexander Mikhailian 
# modified for postnuke pnphpbb conversion by Keizo

# screwed up for drupal 5 by me (actually my wife NewKate)

# Drupal variables for node counts
#
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);

SELECT @forum_title:='Forums';
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';

#
# Create a vocabulary (called "Forum")
#
DELETE FROM vocabulary WHERE module='forum';
INSERT INTO vocabulary (vid,name,description,help,relations,hierarchy,multiple,required,module,weight)
  SELECT @vocabulary_vid+1,@forum_title,'','','0','1','0','1','forum','0';

#
# Set up the vocabulary "Forum" as the forum vocabulary
#
DELETE FROM variable WHERE name = 'forum_nav_vocabulary';
INSERT INTO variable (name, value) VALUES ('forum_nav_vocabulary', CONCAT('i:',@vocabulary_vid+1,';'));

#
# The default comment order in phpbb2 is "oldest first"
#
DELETE FROM variable WHERE name = 'comment_default_order';
INSERT INTO variable (name, value) VALUES ('comment_default_order', 's:1:\"2\";');

#
# Import categories from nuke_phpbb_categories as terms
#
INSERT INTO term_data (tid,vid,name,weight)
  SELECT @term_data_tid+cat_id,@vocabulary_vid+1,cat_title,cat_order
  FROM phpbb_categories;
  
#
# Import terms from nuke_phpbb_forums
#  
INSERT INTO term_data (tid,vid,name,description,weight)
  SELECT @term_data_tid+@phpbb_cat+forum_id,@vocabulary_vid+1, forum_name,forum_desc,forum_order
  FROM phpbb_forums;

ALTER TABLE term_data ORDER BY tid;

#
# Import forum hierarchy 
# Drupal allows topics to be created at this level while phpbb2 does not. If you want to disallow topics below
# categories, mark them as containers in the forum configuration dialog
#


# BROKE HERE!!!!???

#this block to rem later
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);


INSERT INTO term_hierarchy (tid,parent)
  SELECT @term_data_tid+cat_id,'0'
  FROM phpbb_categories;

INSERT INTO term_hierarchy (tid,parent)
  SELECT @term_data_tid+@phpbb_cat+forum_id, @term_data_tid+cat_id
  FROM phpbb_forums;
  
ALTER TABLE term_hierarchy ORDER BY tid;

#
# Create temporary tables for sorting topics and comments.
#

DROP TABLE IF EXISTS temp_posts;
CREATE TABLE temp_posts (
   post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
   topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
   poster_id mediumint(8) DEFAULT '0' NOT NULL,
   post_time int(11) DEFAULT '0' NOT NULL,
   post_edit_time int(11),
   post_subject blob,
   post_text text,
   PRIMARY KEY (post_id),
   KEY forum_id (forum_id),
   KEY topic_id (topic_id),
   KEY poster_id (poster_id),
   KEY post_time (post_time)
);
DROP TABLE IF EXISTS temp_node;
CREATE TABLE temp_node (
   post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
   topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   PRIMARY KEY (post_id),
   KEY topic_id (topic_id)
);
   
#
# Copy into temporary table topics without comments
#
INSERT INTO temp_node (post_id,topic_id)
  SELECT MIN(post_id), topic_id
  FROM phpbb_posts
  GROUP BY topic_id;
INSERT INTO temp_posts (post_id, topic_id,forum_id,poster_id, post_time,post_edit_time,post_subject,post_text)
  SELECT c.post_id, c.topic_id, a.forum_id, IF(a.poster_id='-1','0',a.poster_id), a.post_time, a.post_edit_time, 
  REPLACE(b.post_subject, CONCAT(':',b.bbcode_uid),''), REPLACE(b.post_text, CONCAT(':',b.bbcode_uid),'')
  FROM phpbb_posts AS a, phpbb_posts_text AS b, temp_node AS c
  WHERE c.post_id=a.post_id AND c.post_id=b.post_id;

#
# Insert nid and tid from temp_posts into term_node
#
#this block to rem later
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);

INSERT INTO term_node (nid,tid)
  SELECT @node_nid+topic_id,@term_data_tid+@phpbb_cat+forum_id
  FROM temp_posts;

ALTER TABLE term_node ORDER BY nid;

#
# Insert forum topics from temp_posts into node
#

#this block to rem later
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);

#INSERT INTO node (nid,type,title,uid,created,comment,body,changed)
  #SELECT @node_nid+topic_id,'forum',post_subject,poster_id,post_time,'2',post_text,
  #IF(post_edit_time<>'NULL',post_edit_time,post_time)
  #FROM temp_posts;


SET @default_story_format = 3; 
INSERT INTO node_revisions (nid, title, uid, timestamp, body, format)
 SELECT @node_nid+topic_id,post_subject,poster_id,post_time,post_text,
 @default_story_format
  FROM temp_posts;


INSERT INTO node (nid, type, title, uid, created, comment, changed, vid)
SELECT @node_nid+topic_id,
'forum',
post_subject,
poster_id,
post_time,
'2',
IF(post_edit_time<>'NULL',post_edit_time,post_time),
node_revisions.vid
FROM temp_posts
Inner Join node_revisions on @node_nid+topic_id=node_revisions.nid;


ALTER TABLE node ORDER BY nid;

#
# Insert nid into forum 
#


#this block to rem later
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);

DELETE FROM forum;
INSERT INTO forum (nid,vid,tid)
  SELECT @node_nid+topic_id, vid, @term_data_tid+@phpbb_cat+forum_id
  FROM temp_posts
Inner Join node_revisions on @node_nid+topic_id=node_revisions.nid;
#
# Insert comments into comments for topics from temp_posts
#
INSERT INTO comments (nid,uid,subject,comment,hostname,timestamp,users)
  SELECT @node_nid+a.topic_id,
  CASE WHEN a.poster_id='-1' THEN '0' ELSE a.poster_id END,
  REPLACE(c.post_subject, CONCAT(':',c.bbcode_uid),''),
  REPLACE(c.post_text, CONCAT(':',c.bbcode_uid),''),
  CONCAT_WS('.',CONV(SUBSTRING(a.poster_ip,1,2),16,10),
    CONV(SUBSTRING(a.poster_ip,3,2),16,10),
    CONV(SUBSTRING(a.poster_ip,5,2),16,10),
    CONV(SUBSTRING(a.poster_ip,7,2),16,10)),
  a.post_time,'a:1:{i:0;i:0;}'
  FROM phpbb_posts AS a LEFT JOIN temp_posts AS b ON a.post_id=b.post_id,phpbb_posts_text AS c
  WHERE b.post_id IS NULL AND a.post_id=c.post_id;
ALTER TABLE comments ORDER BY cid;

UPDATE comments,node
  SET comments.subject=IF(comments.subject='',
    CONCAT('Re:',node.title),comments.subject)
  WHERE comments.nid=node.nid;
  
#
# Update thread in comments
#
#this block to rem later
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @term_data_tid:=id FROM sequences WHERE name = 'term_data_tid';
  SELECT IF( @term_data_tid>0,  @term_data_tid, @term_data_tid:=0);
SELECT @comments_cid:=id FROM sequences WHERE name = 'comments_cid';
  SELECT IF( @comments_cid>0,  @comments_cid, @comments_cid:=0);
SELECT @vocabulary_vid:=id FROM sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @vocabulary_vid>0,  @vocabulary_vid, @vocabulary_vid:=0);
SELECT @node_nid:=id FROM sequences WHERE name = 'node_nid';
  SELECT IF( @node_nid>0,  @node_nid, @node_nid:=0);
DROP TABLE IF EXISTS comments_tmp;
CREATE TABLE comments_tmp (
   cid int(10) NOT NULL default '0',
    nid int(10) NOT NULL default '0',
    thread int(10) NOT NULL  auto_increment,
    PRIMARY KEY  (nid,thread)
    );
    
INSERT INTO comments_tmp (cid,nid)
  SELECT cid,nid
  FROM comments
  WHERE cid>@comments_cid;

UPDATE comments,comments_tmp 
  SET comments.thread=CONCAT(CONCAT(REPEAT(9,
    LEFT(comments_tmp.thread,LENGTH(comments_tmp.thread)-1)),
    RIGHT(comments_tmp.thread,1)),'/') 
  WHERE comments.cid=comments_tmp.cid;

#
# Update history
#
#INSERT INTO history (uid, nid, timestamp)
#  SELECT a.uid, b.nid, a.timestamp
#  FROM users AS a, node AS b
#  WHERE a.uid>0 AND b.nid>@node_nid;

#
# update topic statistics 
#

INSERT INTO node_comment_statistics 
  (nid,last_comment_timestamp,last_comment_name,last_comment_uid,comment_count)
  SELECT @node_nid+pt.topic_id, pp.post_time, ppt.post_subject, IF(pp.poster_id=-1,0,pp.poster_id), 
    pt.topic_replies
  FROM node dn, phpbb_topics pt, phpbb_posts pp, phpbb_posts_text ppt
  WHERE dn.nid = @node_nid+pt.topic_id 
    AND pt.topic_last_post_id = pp.post_id 
    AND pp.post_id = ppt.post_id;

#put something into node_counter for read counts (totalcount is the read count, daycount seems to be the #same thing?)
            INSERT INTO node_counter (nid,totalcount,daycount,timestamp)
            SELECT @node_nid+topic_id,
            topic_views,
            topic_views,
            unix_timestamp(topic_time)
            FROM phpbb_topics;

#update for user 2
update node set uid=1 where uid=2;
update node_revisions set uid=1 where uid=2;
update comments set uid=1 where uid=2;


#
# Delete all temp tables
#
DROP TABLE IF EXISTS temp_posts;
DROP TABLE IF EXISTS comments_tmp;
DROP TABLE IF EXISTS temp_node;

#
# Update Drupal variables 
#
SELECT @term_data_tid:=MAX(tid) FROM term_data;
SELECT @comments_cid:=MAX(cid) FROM comments;
SELECT @node_nid:=MAX(nid) FROM node;
SELECT @users_uid:=MAX(uid) FROM users;
SELECT @vocabulary_vid:=MAX(vid) FROM vocabulary;

DELETE FROM sequences WHERE name="term_data_tid";
DELETE FROM sequences WHERE name="comments_cid";
DELETE FROM sequences WHERE name="node_nid";
DELETE FROM sequences WHERE name="users_uid";
DELETE FROM sequences WHERE name="vocabulary_vid";

INSERT INTO sequences (name,id) SELECT "term_data_tid", @term_data_tid;
INSERT INTO sequences (name,id) SELECT "comments_cid",@comments_cid;
INSERT INTO sequences (name,id) SELECT "node_nid",@node_nid;
INSERT INTO sequences (name,id) SELECT "users_uid",@users_uid;  
INSERT INTO sequences (name,id) SELECT "vocabulary_vid",@vocabulary_vid;

--------------------------------------------------------

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/

Quint’s picture

As long as you are backed up, and have something to revert to, go into your mySQL table and see if you can find a variable that could be something like

forum node count
forum node max
forum display number

I bet phpBB and Drupal have a similar-looking variable, but calculate it differently.

It's noteworthy that if you go to the empty pages and change the sort, you still don't see any posts. So Drupal apparently has a max number of posts stored, but still allocates the display pages based on the actual number of posts in the database.

Your General Sci Fi Stuff forum is allocated for 28 pages of posts, at 25 posts per page = 7000, but the last page is probably not all 25, so let's say 6990

That same forum is displaying 22 (x 25 = 5500 posts) full pages and page 23 has 20 posts, so you have 5520 posts displayed, and around 6990 posts allocated.

Look in the tables and see if there is a value around 5520, (or maybe figure the number for the whole forum count.)

Can you change the number of posts per page? You just need to get Drupal to re-figure that number somehow, or maybe you'll have to go into the table manually and find the number and change it yourself.

Quint

Quint’s picture

Also, it would be interesting if you can determine. by changing the sort, if the missing posts change. Since the missing posts are at the end, say you sort by date, and post "AAA help drivers" posted Jan 1, 1999 is at the end and invisible. If you sort by title, does this post show up at the beginning? Or are all the invisible posts always invisible, regardless of sort?

If you find a mod that adds something to every node it might fix that 'broken' counter. Maybe CCK?

SadGeezer’s picture

I tried to do some more analysis of the records that are changed once a comment is added, especially after your comment that phpbb and drupal may handle the same type of variable differently.

To cut a long story short, I noticed that the "last_comment_uid" field in the "node_comment_statistics" table was set to '2' on one of the missing topics. This id theoretically shouldn't have existed as in pnphpbb the admin user id is '2' and that was renamed to '1' when moving to Drupal.

I changed all the last_comment_uid's from 2 to 1 (changed about 550 records) and suddenly all the posts that I had noticed missing, re-appeared.

I don't think that the problem is completely fixed. As you noticed Quint, the last page of some forums (especially large ones) is empty which to me, means that we are still missing some posts in the topic listing, but after a brief check, the forums list the most recent posts (last 12 months).

I think that the others are missing because of some discrepency between user id's from legacy systems (pre-pnphbb2). I'm looking into this a little more and will report any new findings.

Quint, thanks very much for your help. Your tips kept me encouraged and the support and willingness to help was simply excellent! Cheers.

Regards,
Saddy :)

The SadGeezers Guide to Cult Sci Fi
http://www.sadgeezer.com
SadCAST - The Sci Fi Video Podcast
http://sadgeezer.libsyn.com/