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
tourguy
Registered User
Posts: 3
Joined: Mon Jul 29, 2002 8:26 am
Location: Las Vegas, NV
Contact:

number of replies not showing

Post by tourguy »

Just finish installing phpbb, works fine, except I found that there's a reply to a topic and it's not showing in the "replies" column...pls help.
see it here. I didn't require registration to post. Also, the only thing I have tweaked with this phpbb is something I read here.
User avatar
zeroK
Former Team Member
Posts: 20964
Joined: Sun Jan 20, 2002 7:36 pm
Location: Klagenfurt / Austria
Contact:

Post by zeroK »

check your topics-table in the database, if the number of replies is correct there.
Image My weblog | gamerslog.com | No support via PM or ICQ or email - If you don't know a term or a program mentioned in a post -> Google is your friend
tourguy
Registered User
Posts: 3
Joined: Mon Jul 29, 2002 8:26 am
Location: Las Vegas, NV
Contact:

Post by tourguy »

I am only capable of following step by step direction. Would you be able to tell me where? I checked all folders, only found topic_review.php under phpBB/Includes folder and couldn't figure things in it to tweak.
TIA.
DVX_Rune
Registered User
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Post by DVX_Rune »

Same prob ... I checked my database and it shows the same number of replies as the thread index page does ... but they're both wrong. They both show 45 when there's actually 61 replies. You can't even get to those replies unless you click on page 2 of the thread, then go up to the url and change "&start=30" to "&start=60". Then it'll show page 3. But it also says "Page 3 of 2" at the bottom of the screen. :?
Last edited by DVX_Rune on Sat Aug 03, 2002 8:09 pm, edited 1 time in total.
DVX_Rune
Registered User
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Post by DVX_Rune »

If I go into the database and manually change "45" to "61" ... it now shows them ... on a "page 3".

Obviously this is not a final solution. ;)
Ashe
Former Team Member
Posts: 642
Joined: Sun Jul 08, 2001 11:38 am

Post by Ashe »

Here is an ugly fix to force your topic to be resync'ed: post a reply, then split it out with the split function (at the bottom of the page).
DVX_Rune
Registered User
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Post by DVX_Rune »

Doesn't that create another thread though? ... like "Part 2"? ;)
Ashe
Former Team Member
Posts: 642
Joined: Sun Jul 08, 2001 11:38 am

Post by Ashe »

It does, but you can delete this new thread. I have a better fix but it requires you to alter your viewtopic.php file, find:

Code: Select all

else
{
	message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}
and replace it with:

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($postrows))
{
	$resync = TRUE;
}
elseif ($start + $board_config['posts_per_page'] > $forum_topic_data['topic_replies'])
{
	$row_id = $forum_topic_data['topic_replies'] % $board_config['posts_per_page'];
	if ($postrows[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrows) < $forum_topic_data['topic_replies'])
	{
		$resync = TRUE;
	}
}
elseif (count($postrows) < $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'];
}
PktLoss
Registered User
Posts: 8
Joined: Mon Jul 29, 2002 8:08 pm
Contact:

Post by PktLoss »

Just wanted to say thanks, that code patch up there is working wonders,

For those of you unable, or unwilling to spend the time reading that code, just reading a thread will fix an incorrect reply count to the thread. Its this wrong count that causes you to miss out on page #2 or #3 as the forum wont think to display posts, when it doesnt think they are there.

pktloss
forums.edonkey2000.com/phpbb
DVX_Rune
Registered User
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Post by DVX_Rune »

Reading the threads wasn't doing it, posting, deleting, moving ... none of these things made a difference. ;)


Thanks for the code piece, I'm trying it out now. I notice that "number of replies" in the thread index, plus the number of "first" posts (since "replies" doesn't count the first post) ... should, but do NOT add up to "number of posts" listed in the forum index.

I'm not real picky about that so much as the forum not creating a new page when it gets to the 30th post (29th reply) ... but like I said I'm trying that chunk of code now so hopefully that'll do it.

Thanks. :)
nsh
Registered User
Posts: 25
Joined: Thu Aug 08, 2002 8:55 am
Contact:

Post by nsh »

Works like a charm :)
DVX_Rune
Registered User
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Post by DVX_Rune »

Still not working for me. :(

I think it may be partially due to something else. My users seem to be getting alot of 553 errors when they post which basically halts the posting process. It still posts the message but it doesn't change the post count, update the number of pages or forward them back to the thread. :shrug:

I just dunno.

Is there anyway to completely shut off the mail feature? I personally like to get email notifcations for new posts and PM's and a couple of other people do to. But if it's causing problems I'd rather just disable the email feature altogether for now. (any settings I change or delete in the config screen doesn't turn off the email) If I go into the database and turn off everyones notification preferences manually, will that do it? I basically need to stop the forum from even TRYING to send out email. (preferrably just temporarily - ie not a massive change in code - I'd like to get it back and running again eventually)
nsh
Registered User
Posts: 25
Joined: Thu Aug 08, 2002 8:55 am
Contact:

Post by nsh »

Are you using the local sendmail or smtp?

I had no problems until I changed to use smtp(my hosting company was complaining)
Try with/without username/pwd

I did find a way to turn off all mail, which fixes the errors, however it does not send out password emails either.

The following code is thanks to Acyd Burn

emailer.php
Find

Code: Select all

function send() 
   { 
      global $phpEx, $phpbb_root_path; 
After, add

Code: Select all

return true;
The above will turn off all mail being sent out, tricks the board sinto thinking the mail was sent.

There is a way to add a CC field to your emails as well(just incase your hosting company wants that and it is what is stopping you from using sendmail)
User avatar
sublimespot
Registered User
Posts: 34
Joined: Sat Jul 06, 2002 5:58 am

ashes code sample

Post by sublimespot »

I also have the missing page numbers bug happening on my forums. Ashes patch in viewtopic.php has fixed the problem for me. Thanks
Buhallin
Registered User
Posts: 1
Joined: Tue Oct 15, 2002 8:05 am

Post by Buhallin »

Kudos to Ashe on this one - cleaned up the problem quite nicely.

I have to admit that I find this "design decision" incomprehensible... Most users I know use the post counts and last-post-by to watch for things they need to read. Doesn't really matter how fast it is if it's not usable, does it?

Thanks again, Ashe.
Locked

Return to “2.0.x Support Forum”