number of replies not showing

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
User avatar
lozt
Registered User
Posts: 527
Joined: Thu Aug 15, 2002 5:11 am
Location: Paradise

Post by lozt »

Thanks Ashe!!
Your a lifesaver!!
jcridge
Registered User
Posts: 39
Joined: Fri Aug 16, 2002 4:25 am

Post 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


Ashe,

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.

John
User avatar
lozt
Registered User
Posts: 527
Joined: Thu Aug 15, 2002 5:11 am
Location: Paradise

Post 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
User avatar
TC
Former Team Member
Posts: 3633
Joined: Tue Sep 25, 2001 7:23 pm
Location: Kµlt °ƒ Ø, working on my time machine

Post by TC »

don't know how this lasted so long/got missed in discussion...

= moved =
.:: 28:Ø6:42:12 ::.
User avatar
Robo
Registered User
Posts: 9
Joined: Fri Jul 12, 2002 7:58 am

Post by Robo »

the code provided really works like an miracle!! thanx guys :-)
AngusThermopile
Registered User
Posts: 259
Joined: Mon Apr 08, 2002 1:56 am
Location: Scotland
Contact:

Post 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?
ericv8
Registered User
Posts: 13
Joined: Fri Feb 08, 2002 3:28 am

Post 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.

Thanks
Eric

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?
Red-Ice
Registered User
Posts: 74
Joined: Sat Apr 20, 2002 10:43 am
Location: UK

Post 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?
tbartold
Registered User
Posts: 138
Joined: Sat Mar 15, 2003 3:51 am
Contact:

Post 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?
tbartold
Registered User
Posts: 138
Joined: Sat Mar 15, 2003 3:51 am
Contact:

Post by tbartold »

OK... I'm running 2.0.4 and the following code is already in the viewtopics.php

Code: Select all

else
{
   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?
WebDork
Registered User
Posts: 114
Joined: Fri Apr 19, 2002 8:09 am
Location: Sydney, Australia
Contact:

Post 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!
User avatar
lozt
Registered User
Posts: 527
Joined: Thu Aug 15, 2002 5:11 am
Location: Paradise

Post 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?
Dj NaSh
Registered User
Posts: 58
Joined: Thu Apr 01, 2004 6:57 pm
Location: Israel
Contact:

Post by Dj NaSh »

Thanks, ashe!
You're the best!

Had the problem also,
and it's gone :P
Salsa in Israel!
--> www.LaMusica.co.il
Locked

Return to “2.0.x Support Forum”