MyBB Community Forums
[F] On/Off Status in SQLite [C-Michael83] - Printable Version

+- MyBB Community Forums (
+-- Forum: Community Archive (
+--- Forum: Archived Forums (
+---- Forum: Archived Development and Support (
+----- Forum: Archived Bug Reports (
+------ Forum: MyBB 1.4.4 (
+------ Thread: [F] On/Off Status in SQLite [C-Michael83] (/thread-42414.html)

[F] On/Off Status in SQLite [C-Michael83] - Matt - 12-23-2008

MyBB Version: 1.4.4
SQLite Version: 2.8.17
Problem: No matter whether you view a forum, read all the posts in a forum, or click 'Mark All Forums Read' in the footer, the forums always say that there are new posts and display [Image: on.gif]
To reproduce: Make a forum and make just one post in it. Go to the index, and you'll see it's showing there's unread posts. Read the thread, then go back to the forum it was in, and then the index, and it will still say there are unread posts. Click 'Mark All Forums Read' in the footer, it will still say there are new posts.
Extra Info: I have a 1.4.4 forum set up on the same server (localhost) using MySQL and it works fine with that. Also, on the SQLite forum, cookie settings etc are all correct. It also seems to work correctly on SQLite if you are viewing as a Guest. EDIT: Ok, it also seems this might be some sort of cookie issue... I reinstalled and the first time I tried to mark as read, it worked fine, but after that, it didn't, just stayed showing it was unread. 2nd EDIT: Also, when you click the on.gif image, it turns to off.gif, like it should... but when you refresh, it shows as on.gif again.

Here's a quick video if you're interested.

RE: On/Off Status in SQLite - Janko - 12-23-2008

I can confirm the Problem on my 1.4.4 installation with SQLite. Another Problem is, that the function "go to last unread post" is stuck und points alway to the same post although there are many followups in the threads.

For performance reasons I moved the database to MYSql and the problem still exists even on my new database.

[F] On/Off Status in SQLite - Ryan Gordon - 03-20-2009

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group

RE: [F] On/Off Status in SQLite - Ryan Gordon - 03-20-2009

In inc/functions_indicators.php you need to find:

	case "pgsql":
		$db->shutdown_query($db->build_replace_query("forumsread", array('fid' => $fid, 'uid' => $mybb->user['uid'], 'dateline' => TIME_NOW), "fid"));

replace with

	case "pgsql":
	case "sqlite2":
	case "sqlite3":
		$db->shutdown_query($db->build_replace_query("forumsread", array('fid' => $fid, 'uid' => $mybb->user['uid'], 'dateline' => TIME_NOW), "fid"));

and then you'll need the build_replace_query functions for db_sqlite2.php and db_sqlite3.php but I'll commit those since they're not small changes.