MyBB Community Forums

Full Version: threadviews counter not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could this setting be responsible for thread views not updating, all my thread views are set to 0 except one and i have 12 members who have visit every threads on the board.

I tried to set it to yes and thread views remain unchanged.

My members are already not coming back since it seem like my forum get no view from the thread counter.

Is this related to the theme i use, the emerald theme and the author do not answer back yet after a few days posting on his website.

Regards Peter

This is getting frustrating guy's, i have a second board with mybb default theme so i have create a new member to test the board statistics, i visit the thread and it is not updating in thread views, also the new member status show offline but he is online.

So basically i thought it was the emerald theme that was giving me all these problems but even the mybb default theme have the same issues.

Should i revert back to an older version of MYBB where these features were working or what?

It's about 3 days i am trying to fix these and i am still stuck and one of my board is getting deserted from the users because of these issues!

I know mybb is free and we cannot get the type of support from paid software but i don't know what to do anymore and i am stuck.

Regards Peter

Here the proof that the online status is not working even in mybb default theme :

[Image: h7MM71t.jpg]

OK i was finally able to fix the thread views counter by modyfying the showthread.php, i found this solution in this thread here: https://community.mybb.com/thread-71144.html

So if anyone get a problem with thread counter views staying on 0 and not increment then use this code here :

in showthread.php

change this:


	// Increment the thread view.
	if($mybb->settings['delayedthreadviews'] == 1)
	{
		$db->shutdown_query("INSERT INTO ".TABLE_PREFIX."threadviews (tid) VALUES('{$tid}')");
	}
	else
	{
		$db->shutdown_query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
	}
	++$thread['views'];

to this here :

	// Increment the thread view.
	if($mybb->settings['delayedthreadviews'] == 1)
	{
		$db->shutdown_query("INSERT INTO ".TABLE_PREFIX."threadviews (tid) VALUES('{$tid}')");
	}
	else
	{
//		$db->shutdown_query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
		$db->query("UPDATE ".TABLE_PREFIX."threads SET views=views+1 WHERE tid='{$tid}'");
	}
	++$thread['views'];
As with your other threads, there is clearly something wrong with the configuration of this board as there's numerous things that are not updating suggesting they are being cached, and nobody else seems to be having the issue. Disable Redis so the board is completely stock, and test then.

That above fix isn't really solving it, because if shutdown queries are not running, that indicates something else is wrong.
(2022-11-08, 11:34 AM)Matt Wrote: [ -> ]As with your other threads, there is clearly something wrong with the configuration of this board as there's numerous things that are not updating suggesting they are being cached, and nobody else seems to be having the issue. Disable Redis so the board is completely stock, and test then.

That above fix isn't really solving it, because if shutdown queries are not running, that indicates something else is wrong.

Could be Matt but at least for the moment the views counter is working, if reverting to default cache work then i will remove it and see if views counter work.
Regards Peter