MyBB Community Forums

Full Version: Broken thread view counter caused by old plugin MyTracker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I've managed to get MyTracker (1.0.1, didn't find the newer 1.0.2) working under MyBB 1.8.27. Everything works perfectly but today i realized the thread view counter does not work anymore. I figured out that plugins can cause this and yes, right after deactivating MyTracker the thread view counter works again. I tried to fix it by doing the MyTracker upgrade process without success.

Any ideas how this could be fixed?

It seems to be fixed by the following code changes in showthread.php:

if($mybb->settings['delayedthreadviews'] == 1)
	$db->shutdown_query("INSERT INTO ".TABLE_PREFIX."threadviews (tid) VALUES('{$tid}')");
	//$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}'");