Comment count not updated

Describe the problem you’re having:
At least for one of my feeds I discovered that comment count is not updated. I found a topic from 2017 about similar issue so not sure if this is by design or a bug. I recall that some time ago comments were updated correctly on this feed so perhaps there is a bug somewhere?

If possible include steps to reproduce the problem:
For this feed I observed that comment count is not updated after initial import:
http://lowcygier.pl/feed/
When ttrss pulls the article with comments already, the number is shown in the IU but no updates later are shown.

tt-rss version (including git commit id):
Tiny Tiny RSS v20.04-44b1f0fcc

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
Debian testing on physical machine, PHP 7.4, PostgreSQL 12 running stable for years

Please provide any additional information below:
For this particular entry ttrss shows no comments in UI.
Feed debugger log:
[18:46:14/105233] guid 1,Nioh 2 za 189,90 zł w Ultimie / SHA1:c9b8d013ef744f5f938ff8d35f76351953f2cc92
[18:46:14/105233] orig date: 1586191657
[18:46:14/105233] title Nioh 2 za 189,90 zł w Ultimie
[18:46:14/105233] link Nioh 2 za 189,90 zł w Ultimie
[18:46:14/105233] language pl
[18:46:14/105233] author StayUpForever
[18:46:14/105233] looking for tags…
[18:46:14/105233] tags found: promocje pudełkowe
[18:46:14/105233] done collecting data.
[18:46:14/105233] article hash: a539855e60e6ffee3b5cf26c2190c13ebb568e10 [stored=5ad8e4b244b5338781941ead9ad1cc800e69d891]
[18:46:14/105233] hash differs, applying plugin filters:
[18:46:14/105233] … Af_Comics
[18:46:14/105233] === 0.0000 (sec)
[18:46:14/105233] … Af_Fsckportal
[18:46:14/105233] === 0.0001 (sec)
[18:46:14/105233] … Af_Readability
[18:46:14/105233] === 0.0000 (sec)
[18:46:14/105233] … Af_RedditImgur
[18:46:14/105233] === 0.0000 (sec)
[18:46:14/105233] … Af_Unburn
[18:46:14/105233] === 0.0000 (sec)
[18:46:14/105233] … Auto_Assign_Labels
[18:46:14/105233] === 0.0003 (sec)
[18:46:14/105233] … Feediron
[18:46:14/105233] === 0.0000 (sec)
[18:46:14/105233] plugin data: af_comics,af_fsckportal,af_readability,af_redditimgur,af_unburn,auto_assign_labels,feediron,
[18:46:14/105233] date 1586191657 [2020/04/06 16:47:37]
[18:46:14/105233] num_comments: 4
[18:46:14/105233] force catchup:
[18:46:14/105233] base guid found, checking for user record
[18:46:14/105233] initial score: 0 [including plugin modifier: 0]
[18:46:14/105233] user record FOUND: RID: 10555413, IID: 10614928
[18:46:14/105233] resulting RID: 10555413, IID: 10614928
[18:46:14/105233] article updated, but we’re forbidden to mark it unread.
[18:46:14/105233] assigning labels [other]…
[18:46:14/105233] assigning labels [filters]…
[18:46:14/105233] looking for enclosures…
[18:46:14/105233] filtered tags: promocje pudełkowe
[18:46:14/105233] article processed

this seems to work properly for me after some testing, comment counts do update to number specified in the debug log (i.e. num_comments: xxx).

i’ve updated my own test feeds to include slash:comments and changed the number randomly a few times, and also updated some comment counts in the cached XML file of the above feed, both seemed to have updated properly.

you can check the data yourself (after feed update) via SQL like this:

select num_comments from ttrss_user_entries, ttrss_entries where int_id = IID and id = ref_id;

where IID is the resulting IID shown in the above log.

i’ve found an unrelated issue (?) however - comment counts were not displayed when comment link was not specified but comment count was non-zero, i’ve changed it so in this situation comments are still displayed in the UI with link leading to the article.

i’ve found an unrelated issue (?) however - comment counts were not displayed when comment link was not specified but comment count was non-zero, i’ve changed it so in this situation comments are still displayed in the UI with link leading to the article.

I guess this is my issue. I checked again old entries which had comments in first place and the count is correct. Only entries that got comments after initial load are affected - displaying no comments at all.

nope, this can’t be it - stuff i changed is entirely cosmetic i.e UI, it would be fixed after page reload.
its probably something else then.

i’ve added some slash:comments to a feed entry and re-run feed debugger on it, comments updated normally. i dunno.

Ok, it seems comment count in database is correct:

tt-rss=# select num_comments from ttrss_user_entries, ttrss_entries where int_id = 10614928 and id = ref_id;
 num_comments
--------------
            6
(1 row)

So this is related to display issues.
Update:
I pulled Tiny Tiny RSS v20.04-afaac95d8 and comment count is visible on the articles! I guess problem solved. Thanks @fox!

it could be a different UI issue, if this keeps happening try to figure out why (or how to reproduce it reliably i guess) :slight_smile: