#1054608 tt-rss: New entries always marked as read even if the unread counter is not null

Package:
tt-rss
Source:
tt-rss
Submitter:
Antoine EMERIT
Date:
2024-02-08 23:12:03 UTC
Severity:
normal
Tags:
#1054608#5
Date:
2023-10-26 18:41:10 UTC
From:
To:
Dear Maintainer,

After a dist-upgrade my server from Debien 11 to Debian 12, my Tiny Tiny RSS server diplays
all new entries as already ridden. The unread counters are not impacted.

To reproduce :
- access to new unread entries in any categories (or in "Unread Articles"), unread entries
  are well displayed but the title text is greyed.
- the unread filter is well applied and the unread counters count theses entries.
- manually mark an entry as unread -> counter doens't change (this is correct)
- manually mark an entry as read -> counter is correctly decreased (this is correct)

After a search in the javascript, I see that the entry JSON attribut returned by the
backend.php is always "unread: 0".

In the class/feeds.php at line 258, I see a specific code that check the unread database
value and retest it in case of mysql :

if (DB_TYPE == "mysql") {
   foreach (["unread", "marked", "published"] as $k) {
      $line[$k] = $line[$k] === "1";
   }
}

I suspect a change in the MariaDB upgrade that cause this problem.

I propose the following simple modification :
diff classes/feeds.php classes/feeds.php.old
258c258
< 						$line[$k] = $line[$k]  === 1 || $line[$k] === "1";
---

Regards

#1054608#10
Date:
2024-02-08 16:03:48 UTC
From:
To:
I agree, this is MAJOR usability problem.

I can confirm that the patch suggested here works, as does the (two-years old) upstream change:
https://git.tt-rss.org/fox/tt-rss.git/commit/?id=931e33c3818d160a2ea4e7e30c220df0b622cca7

So either applying patch, or upgrading the tt-rss to newer upstream would fix the issue.