Page 2 of 2

Posted: Sun Oct 27, 2002 12:36 am
by lozt
Thanks Ashe!!
Your a lifesaver!!

Posted: Wed Nov 13, 2002 4:23 am
by jcridge
Ashe wrote: It does, but you can delete this new thread. I have a better fix but it requires you to alter your viewtopic.php file


Do you know why this problem started happening? I noticed it started happening to me after I switched from using the internal mailer to the smtp mailer.

Could this be related?

Thanks for the fix by the way. It appears to work great and my replies counts are correct now.


Posted: Wed Nov 13, 2002 4:30 am
by lozt
jcridge wrote: I noticed it started happening to me after I switched from using the internal mailer to the smtp mailer.

i think your right; thats when i started having problems

Posted: Wed Nov 13, 2002 4:48 am
by TC
don't know how this lasted so long/got missed in discussion...

= moved =

Posted: Tue Dec 03, 2002 11:42 pm
by Robo
the code provided really works like an miracle!! thanx guys :-)

Posted: Fri Dec 20, 2002 2:01 am
by AngusThermopile
Thank you ash for that first fix you posted, it worked a charm for me. :)

Does anyone know if it can be removed after awhile? Or would it;s removal cause the resurfacing of the old problems?

Posted: Fri Dec 20, 2002 5:25 am
by ericv8
When this starting happening on some of the threads in my forum, the only thing I could think to do was to increase number of posts shown on a page from 25 to 100!! LOL...

I am glad to have stumbled upon this fix. Funny thing is my wife has the same phpbb version running on her site on the same server and she has no problems at all.

Should I try Ashe's patch? Or is this fixed in 2.0.4? At this point I would rather wait if this fix was implemented in the new version.


PS... when I started getting this problem, my Subject Line stopped working in replies. What I mean by this is if someone replies to a topic, anything they type in the subject line does not display in their post, only the actual reply message displays. Is this related? Or should I post a seperate bug report?

Posted: Sun Dec 29, 2002 6:49 pm
by Red-Ice
the code worked great for me, thanks. :D

Stupid question...but does the code need to be kept thier or should i put it back to how it was?

Posted: Sun Mar 16, 2003 4:35 pm
by tbartold
Not to be a naysayer or anything but...

I am running 2.0.4, and actually just converted earier this week from UBB. I'm having the exact same problem on some long topics (>10 pages), but not others. Did the conversion result in permanent problems?

2.0.4 has this code fix in it already (I looked). And I tried resyncing to no avail. I have no mods installed, except for a fix in sessions.php to cure the sessions table full error.

Reading a topic does not auto reset the pages. Posting doesn't do it either. Resync does nothing. Is the code in 2.0.4 actually working? Does resync do anything in 2.0.4?

Posted: Thu Mar 20, 2003 1:31 am
by tbartold
OK... I'm running 2.0.4 and the following code is already in the viewtopics.php

Code: Select all

   include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
   sync('topic', $topic_id);

   message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);

$resync = FALSE;
if ($forum_topic_data['topic_replies'] + 1 < $start + count($postrow))
   $resync = TRUE;
elseif ($start + $board_config['posts_per_page'] > $forum_topic_data['topic_replies'])
   $row_id = intval($forum_topic_data['topic_replies']) % intval($board_config['posts_per_page']);
   if ($postrow[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrow) < $forum_topic_data['topic_replies'])
      $resync = TRUE;
elseif (count($postrow) < $board_config['posts_per_page'])
   $resync = TRUE;

if ($resync)
   include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
   sync('topic', $topic_id);

   $result = $db->sql_query('SELECT COUNT(post_id) AS total FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . $topic_id);
   $row = $db->sql_fetchrow($result);
   $total_replies = $row['total'];
If you look closely, it is not exactly the same as the suggested fix.

The main difference is that the fix uses $postrows where the code in 2.0.4 uses $postrow (notice that there is no 's'). and the fix did not use the intval function.

Could either of these differences explain why I still have phantom pages???

Is 2.0.4 broken?

Posted: Thu Apr 10, 2003 3:34 am
by WebDork
Big thanks from me too Ashe. Been looking for this fix for months - dont know why I missed this thread before, but works perfectly!

Posted: Mon Feb 23, 2004 6:21 pm
by lozt
im using phpBB 2.0.6 and currently using PCP, keep unread and having problems with replies.

the old version fix does not apply to phpBB 2.0.6
is anyone else having this problem?

Posted: Sat Aug 14, 2004 9:10 am
by Dj NaSh
Thanks, ashe!
You're the best!

Had the problem also,
and it's gone :P