Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Mark as read" broken since recent updates #1344

Closed
3 tasks done
albatros69 opened this issue May 5, 2021 · 34 comments · Fixed by #1339
Closed
3 tasks done

"Mark as read" broken since recent updates #1344

albatros69 opened this issue May 5, 2021 · 34 comments · Fixed by #1339
Labels
bug frontend impact Javascript/Frontend code

Comments

@albatros69
Copy link

albatros69 commented May 5, 2021

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

  • I have read the CONTRIBUTING.md and followed the provided tips
  • I accept that the issue will be closed without comment if I do not check here
  • I accept that the issue will be closed without comment if I do not fill out all items in the issue template.

Explain the Problem

Since the update to 15.4.0, I'm facing issue with the "Mark as read" action, which stops working properly. If I try to "mark as read" a feed or a category, the entries seems to be marked as read and the unread counter is updated. However, after a few seconds, the articles are turned back to unread. Most of the times, the whole set of unread articles pops back, but sometimes it's just a subset.
If I do the same on the "Unread articles", I get the same behavior.

Steps to Reproduce

Explain what you did to encounter the issue

  1. Right-click on a feed or category
  2. Choose "Mark as read"
  3. The correct behavior seems to be triggered (counter and status updated)
  4. Wait for a few sec or just click on another feed, and the articles you just marked as read just reappear (counter and status back to read state).

System Information

  • News app version: 15.4.3
  • Nextcloud version: 21.0.1
  • Cron type: cron
  • PHP version: 7.3.27
  • Database and version: PostgreSQL 11.11
  • Browser and version: FF 78 ESR and FF 88
  • OS and version: Linux Debian 10.9 and 11 (unstable)
Contents of nextcloud/data/nextcloud.log

No error seems related to that; I see only intermittent connection error to retrieve particular feeds.

Contents of Browser Error Console
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. main.js:1:223331
Content Security Policy: Les paramètres de la page ont empêché le chargement d’une ressource à eval (« script-src »). angular.min.js:205
Request to access cookie or storage on “<URL>” was blocked because we are blocking all third-party storage access requests and content blocking is enabled. 19
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 884 main.js:1:1554355
jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 116 main.js:1:1554355
Erreur dans les liens source : Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL de la ressource : https://<...>/core/js/dist/main.js?v=4ea93f8c-0
URL du lien source : main.js.map
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 121 main.js:1:1554355
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 14 main.js:1:1554355
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 107 main.js:1:1554355
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 120 main.js:1:1554355
jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 4 main.js:1:1554355
$ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. main.js:1:1554355
$ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 2 main.js:1:1554355
moment is deprecated: please ship your own, this will be removed in Nextcloud 20 120 main.js:1:1554355
jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 8 main.js:1:1554355
@albatros69 albatros69 added the bug label May 5, 2021
@jochen35
Copy link

jochen35 commented May 6, 2021

I can confirm that.

@ghtux
Copy link

ghtux commented May 6, 2021

Same here, no errors in logs.

  • News 15.4.3 (same problem sometimes with 15.3.x)
  • Nextcloud 20.0.9.1
  • MariaDB 10.3.27
  • PHP 7.4
  • Debian Buster

@tweitzel
Copy link

tweitzel commented May 7, 2021

I have at least confirmed on my instance that items are getting marked read in the database, but neither the API nor the web UI honor them.

MariaDB [owncloud]> select id,title,unread from oc_news_items where id=18551;
+-------+--------------------------------------------------------------------------+--------+
| id    | title                                                                    | unread |
+-------+--------------------------------------------------------------------------+--------+
| 18551 | As San Jose Sharks give kids a shot, Martin Jones faces uncertain future |      1 |
+-------+--------------------------------------------------------------------------+--------+
1 row in set (0.000 sec)

MariaDB [owncloud]> select id,title,unread from oc_news_items where id=18551;
+-------+--------------------------------------------------------------------------+--------+
| id    | title                                                                    | unread |
+-------+--------------------------------------------------------------------------+--------+
| 18551 | As San Jose Sharks give kids a shot, Martin Jones faces uncertain future |      0 |
+-------+--------------------------------------------------------------------------+--------+
1 row in set (0.000 sec)

I wonder if it is related to this change, as my database is still showing a tinyint(1) instead of a bool. However I have not touched php+mysql/mariadb in something like ten years.

@albatros69
Copy link
Author

albatros69 commented May 7, 2021

When I click on "Mark as read", the status seems to be updated on the interface, but this is not reflected in the table (I checked live). Then, when the interface is updated (waiting a few sec or clicking somewhere else), the articles reappear. If I update manually the status in the table, all seem to be correct (the interface is updated accordingly).

In my case, the column is a boolean.

nextclouddb=# select id,unread from oc_news_items where unread limit 5; 
   id   | unread 
--------+--------
 141210 | t
 141211 | t
 141212 | t
 141213 | t
 141214 | t
(5 rows)

nextclouddb=# \d oc_news_items
                                         Table "public.oc_news_items"
      Column       |         Type          | Collation | Nullable |                  Default                  
-------------------+-----------------------+-----------+----------+-------------------------------------------
 id                | bigint                |           | not null | nextval('oc_news_items_id_seq'::regclass)
 guid_hash         | character varying(32) |           | not null | 
 fingerprint       | character varying(32) |           |          | NULL::character varying
 content_hash      | character varying(32) |           |          | NULL::character varying
 rtl               | boolean               |           | not null | false
 search_index      | text                  |           |          | 
 guid              | text                  |           | not null | 
 url               | text                  |           |          | 
 title             | text                  |           |          | 
 author            | text                  |           |          | 
 pub_date          | bigint                |           |          | 
 body              | text                  |           |          | 
 enclosure_mime    | text                  |           |          | 
 enclosure_link    | text                  |           |          | 
 feed_id           | bigint                |           | not null | 
 unread            | boolean               |           | not null | false
 starred           | boolean               |           | not null | false
 last_modified     | bigint                |           |          | 0
 media_thumbnail   | text                  |           |          | 
 media_description | text                  |           |          | 
 categories_json   | json                  |           |          | 
Indexes:
    "oc_news_items_pkey" PRIMARY KEY, btree (id)
    "idx_ea56d89651a5bc03" btree (feed_id)
    "news_items_fingerprint_idx" btree (fingerprint)
    "news_items_item_guid" btree (guid_hash, feed_id)
    "news_items_last_mod_idx" btree (last_modified)
    "news_items_starred_feed_id" btree (starred, feed_id)
    "news_items_unread_feed_id" btree (unread, feed_id)
    "news_items_unread_id" btree (unread, id)
Foreign-key constraints:
    "feed" FOREIGN KEY (feed_id) REFERENCES oc_news_feeds(id) ON DELETE CASCADE

@mhzawadi
Copy link

mhzawadi commented May 7, 2021

Hello,

Not sure if this helps any, have just tested marking a folder read with Chrome dev tools open. Had the disable cache option ticked and the list of read items gets updated, it could that the refresh doesnt load new data from the DB and is jus what was already pulled

@Grotax Grotax added the frontend impact Javascript/Frontend code label May 7, 2021
@SMillerDev
Copy link
Contributor

Can anyone check what query is actually being executed for them? I haven't been able to figure out anything that could realistically have changed this so currently I suspect Doctrine might be hiding some magic.

@albatros69
Copy link
Author

albatros69 commented May 13, 2021

Hello @SMillerDev,
From what I can see, clicking on "Mark as read" triggers a bunch of POST requests on https://#nextcloud#/apps/news/feeds/162/read (id different each time), with a JSON request similar to:

{"highestItemId":143156}

and a response similar to:

{
	"feeds": [
		{
			"id": 162,
			"unreadCount": 0
		}
	]
}

From what I get, the ids are the ones of the different feeds of the category which I tried to mark as read. The same behavior is triggered if I open an article, but the POST response data (which are more or less empty).

@Sortova
Copy link

Sortova commented May 18, 2021

Just chiming in that I have the same issue (News 15.4.3 on NextCloud 21.0.1).

It does seem to work correctly via the CloudNews app on my iPhone.

@asmw
Copy link

asmw commented May 19, 2021

I can also confirm that marking articles read in the Nextcloud News Android App (de.luhmer.owncloudnewsreader) works

@rabauke

This comment has been minimized.

@SMillerDev
Copy link
Contributor

Without logs any reproduction attempts are useless for debugging.

@albatros69
Copy link
Author

Without logs any reproduction attempts are useless for debugging.

I fully agree and this issue is quite puzzling as I can't see any trace (error logs, console logs) giving a clue where to look.
If you could point us to some directions where to look (activate log, activate debug somewhere), I would be more than happy to take some time to investigate and provide you with debugging material.

@SMillerDev
Copy link
Contributor

Well, the screenshot above mentions an internal server error. I'm pretty sure that would log something.

@anoymouserver
Copy link
Contributor

The client mentioned above is quite old and wasn't updated since 2018 .. maybe something in the API changed in the meantime (e.g. with #939).

What clients do you (the people with this issue) use? Some older client, the official Android client, the webinterface itself, ..?

@albatros69
Copy link
Author

Well, the screenshot above mentions an internal server error. I'm pretty sure that would log something.

Ah, ok. I thought you were giving a more general comment. My bad...
This is maybe a more specific issue with this app, as the News web interface doesn't trigger any http 500 errors. Neither does the "official" News Android app.

@albatros69
Copy link
Author

albatros69 commented May 20, 2021

What clients do you (the people with this issue) use? Some older client, the official Android client, the webinterface itself, ..?

Personally, the web interface mainly. For this specific issue, I also tried the News Android app which seems to have a complete different behavior, not being affected by the issue. However, even if I didn't tested it extensively, it seems that if you use both of them at the same time, there's a discrepancy of the unread statuses between the two.

@asmw

This comment has been minimized.

@rabauke

This comment has been minimized.

@9R

This comment has been minimized.

@SMillerDev
Copy link
Contributor

That one is trying to mark an item as read that doesn't exist for the calling user. Somehow the feed contains items that are not allowed.

@rabauke

This comment has been minimized.

@Grotax
Copy link
Member

Grotax commented May 22, 2021

Hey everyone that is still affected by this please copy below form and fill it for your case.
Because we need to search for similarities in the setups, it's clear that it's not a general issue affecting everyone so it's very likely specific combinations that will trigger this. I think that php and DB are the most important in this case.

News app version:
Nextcloud version:
Cron type:
PHP version:
Database and version:
Browser and version:
(optional) Client software:
Server OS and version:

Also please check on the DB if the schema of the $prefix_news_items matches either:

MySQL/MariaDB

mysql> desc oc_news_items;
+-------------------+-----------------+------+-----+---------+----------------+
| Field             | Type            | Null | Key | Default | Extra          |
+-------------------+-----------------+------+-----+---------+----------------+
| id                | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| guid_hash         | varchar(32)     | NO   | MUL | NULL    |                |
| fingerprint       | varchar(32)     | YES  | MUL | NULL    |                |
| content_hash      | varchar(32)     | YES  |     | NULL    |                |
| rtl               | tinyint(1)      | NO   |     | 0       |                |
| search_index      | longtext        | YES  |     | NULL    |                |
| guid              | longtext        | NO   |     | NULL    |                |
| url               | longtext        | YES  |     | NULL    |                |
| title             | longtext        | YES  |     | NULL    |                |
| author            | longtext        | YES  |     | NULL    |                |
| pub_date          | bigint          | YES  |     | NULL    |                |
| body              | longtext        | YES  |     | NULL    |                |
| enclosure_mime    | longtext        | YES  |     | NULL    |                |
| enclosure_link    | longtext        | YES  |     | NULL    |                |
| feed_id           | bigint unsigned | NO   | MUL | NULL    |                |
| last_modified     | bigint          | YES  | MUL | 0       |                |
| unread            | tinyint(1)      | NO   | MUL | 0       |                |
| starred           | tinyint(1)      | NO   | MUL | 0       |                |
| media_thumbnail   | longtext        | YES  |     | NULL    |                |
| media_description | longtext        | YES  |     | NULL    |                |
| categories_json   | json            | YES  |     | NULL    |                |
+-------------------+-----------------+------+-----+---------+----------------+
21 rows in set (0.01 sec)

Or
PostgreSQL as mentioned by @albatros69

nextclouddb=# \d oc_news_items
                                         Table "public.oc_news_items"
      Column       |         Type          | Collation | Nullable |                  Default                  
-------------------+-----------------------+-----------+----------+-------------------------------------------
 id                | bigint                |           | not null | nextval('oc_news_items_id_seq'::regclass)
 guid_hash         | character varying(32) |           | not null | 
 fingerprint       | character varying(32) |           |          | NULL::character varying
 content_hash      | character varying(32) |           |          | NULL::character varying
 rtl               | boolean               |           | not null | false
 search_index      | text                  |           |          | 
 guid              | text                  |           | not null | 
 url               | text                  |           |          | 
 title             | text                  |           |          | 
 author            | text                  |           |          | 
 pub_date          | bigint                |           |          | 
 body              | text                  |           |          | 
 enclosure_mime    | text                  |           |          | 
 enclosure_link    | text                  |           |          | 
 feed_id           | bigint                |           | not null | 
 unread            | boolean               |           | not null | false
 starred           | boolean               |           | not null | false
 last_modified     | bigint                |           |          | 0
 media_thumbnail   | text                  |           |          | 
 media_description | text                  |           |          | 
 categories_json   | json                  |           |          | 

If your schema does not match either of these please say so, else no need to post your schema.

If your issue only happens when you use client X but not with the news web-interface, please get in touch with the maintainer of the app, we can't help with that.

@ghtux
Copy link

ghtux commented May 22, 2021

News app version: 15.4.4
Nextcloud version: 20.0.10.1
Cron type: Cron
PHP version: 7.4.18
Database and version: MariaDB 10.3.27
Browser and version: Firefox 88.0.1
(optional) Client software: News app (F-Droid)
Server OS and version: Raspbian Buster

mysql> desc oc_news_items;
Output:
| Field             | Type                | Null | Key | Default | Extra          |
|-------------------|---------------------|------|-----|---------|----------------|
| id                | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| guid_hash         | varchar(32)         | NO   | MUL | NULL    |                |
| fingerprint       | varchar(32)         | YES  | MUL | NULL    |                |
| content_hash      | varchar(32)         | YES  |     | NULL    |                |
| rtl               | tinyint(1)          | NO   |     | 0       |                |
| search_index      | longtext            | YES  |     | NULL    |                |
| guid              | longtext            | NO   |     | NULL    |                |
| url               | longtext            | YES  |     | NULL    |                |
| title             | longtext            | YES  |     | NULL    |                |
| author            | longtext            | YES  |     | NULL    |                |
| pub_date          | bigint(20)          | YES  |     | NULL    |                |
| body              | longtext            | YES  |     | NULL    |                |
| enclosure_mime    | longtext            | YES  |     | NULL    |                |
| enclosure_link    | longtext            | YES  |     | NULL    |                |
| media_thumbnail   | longtext            | YES  |     | NULL    |                |
| media_description | longtext            | YES  |     | NULL    |                |
| feed_id           | bigint(20) unsigned | NO   | MUL | NULL    |                |
| unread            | tinyint(1)          | NO   | MUL | 0       |                |
| starred           | tinyint(1)          | NO   | MUL | 0       |                |
| last_modified     | bigint(20)          | YES  | MUL | 0       |                |
| categories_json   | longtext            | YES  |     | NULL    |                |

@Anrock
Copy link

Anrock commented May 22, 2021

News app version: 15.4.3
Nextcloud version: 21.0.2
Cron type: cronie 1.5.2
PHP version: 7.4
Database and version: postgresql 12.6
Browser and version: Firefox 88.0.1
Server OS and version: Gentoo

Schema matches.

@mhzawadi
Copy link

News app version: 15.4.4
Nextcloud version: 21.0.1
Cron type: cron
PHP version: 7.4.18 (FPM)
Database and version: 10.3.27
Browser and version: Opera 76.0.4017.137 (x86_64)
(optional) Client software: News app (F-Droid)
Server OS and version: Debian Buster

Also please check on the DB if the schema of the $prefix_news_items matches either:

MySQL/MariaDB

MariaDB [horwood_nextcloud]> desc oc_news_items;
+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| id                | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| guid_hash         | varchar(32)         | NO   | MUL | NULL    |                |
| fingerprint       | varchar(32)         | YES  | MUL | NULL    |                |
| content_hash      | varchar(32)         | YES  |     | NULL    |                |
| rtl               | tinyint(1)          | NO   |     | 0       |                |
| search_index      | longtext            | YES  |     | NULL    |                |
| guid              | longtext            | NO   |     | NULL    |                |
| url               | longtext            | YES  |     | NULL    |                |
| title             | longtext            | YES  |     | NULL    |                |
| author            | longtext            | YES  |     | NULL    |                |
| pub_date          | bigint(20)          | YES  |     | NULL    |                |
| body              | longtext            | YES  |     | NULL    |                |
| enclosure_mime    | longtext            | YES  |     | NULL    |                |
| enclosure_link    | longtext            | YES  |     | NULL    |                |
| feed_id           | bigint(20) unsigned | NO   | MUL | NULL    |                |
| last_modified     | bigint(20)          | YES  | MUL | 0       |                |
| unread            | tinyint(1)          | NO   | MUL | 0       |                |
| starred           | tinyint(1)          | NO   | MUL | 0       |                |
| media_thumbnail   | longtext            | YES  |     | NULL    |                |
| media_description | longtext            | YES  |     | NULL    |                |
| categories_json   | longtext            | YES  |     | NULL    |                |
+-------------------+---------------------+------+-----+---------+----------------+

@9R
Copy link

9R commented May 22, 2021

News app version: 15.4.4
Nextcloud version: 21.0.2.1
Cron type: cron (systemd timer)
PHP version: 8.0.6
Database and version: 10.5.10
Browser and version: Firefox 88.0.1
(optional) Client software: newsboat 2.23
Server OS and version: up-to-date archlinux

Only difference in db-schema is that the field categories_json is of type longtext instead of json

@macearl
Copy link

macearl commented May 23, 2021

I'm also experiencing this problem and for me it seems to be related to a wrong sql query

My setup:
News app version: 15.4.0
Nextcloud version: 20.0.9
Cron type: system crontab
PHP version: 7.3.27
Database and version: mariadb 10.3.27
Browser and version: Firefox 88.0.1
(optional) Client software: problems only exists in nextcloud webinterface, android news app works fine
Server OS and version: Raspberry OS 64 Bit (Debian Stretch)

I just ran a test with the general sql log enabled:

SELECT `items`.`id`,`items`.`title` FROM `oc_news_items` `items` INNER JOIN `oc_news_feeds` `feeds` ON items.feed_id = feeds.id WHERE (feeds.user_id = 'user') AND (feeds.deleted_at = 0) AND (items.unread = '1') ORDER BY `items`.`id` ASC;

listed the ids 224430 through 224509 as unread (these include 5 entries the web interface did not show before)
But when i clicked the mark all as read button in the web interface two queries were generated:

SELECT `items`.`id` FROM `oc_news_items` `items` INNER JOIN `oc_news_feeds` `feeds` ON items.feed_id = feeds.id WHERE (feeds.user_id = 'user') AND (items.id <= '224126');
UPDATE `oc_news_items` SET `unread` = 0 WHERE (id IN (222923, 222936, 222944, 222945, 222956, 222960, 222961, 222975, 222986, 222987, 222988, 223001, 223012, 223013, 223014, 223015, 223027, 223042, 223058, 223059, 223075, 223086, 223095, 223096, 223108, 223109, 223120, 223121, 223138, 223153, 223154, 223175, 223176, 223188, 223189, 223214, 223223, 223238, 223239, 223240, 223251, 223252, 223267, 223268, 223283, 223293, 223294, 223301, 223317, 223318, 223326, 223335, 223342, 223350, 223361, 223362, 223377, 223386, 223387, 223391, 223397, 223404, 223424, 223483, 223493, 223503, 223510, 223516, 223522, 223568, 223569, 223575, 223579, 223585, 223586, 223587, 223596, 223597, 223610, 223611, 223627, 223635, 223647, 223648, 223655, 223661, 223671, 223672, 223673, 223689, 223697, 223706, 223707, 223712, 223713, 223723, 223734, 223735, 223751, 223759, 223769, 223770, 223777, 223778, 223779, 223785, 223786, 223787, 223801, 223807, 223808, 223814, 223816, 223817, 223819, 223827, 223828, 223838, 223846, 223847, 223864, 223870, 223871, 223879, 223881, 223882, 223892, 223893, 223894, 223895, 223910, 223911, 223912, 223913, 223921, 223929, 223937, 223943, 223960, 223973, 223974, 224029, 224031, 224039, 224047, 224059, 224063, 224072, 224085, 224095, 224096, 224103, 224104, 224117, 219632, 219666, 219684, 219702, 219722, 219723, 219765, 219766, 219790, 219806, 219843, 219851, 219863, 219877, 219898, 219925, 219926, 219958, 219970, 219989, 220002, 220015, 220058, 220072, 220244, 220261, 220271, 220272, 220280, 220296, 220302, 220319, 220335, 220368, 220393, 220408, 220419, 220432, 220470, 220471, 220499, 220518, 220536, 220557, 220572, 220579, 220602, 220603, 220623, 220624, 220641, 220655, 220656, 220677, 220698, 220721, 220740, 220750, 220778, 220792, 220813, 220822, 220840, 220841, 220865, 220871, 220872, 220892, 220904, 221031, 221042, 221050, 221065, 221088, 221089, 221120, 221136, 221155, 221174, 221175, 221201, 221234, 221249, 221275, 221301, 221302, 221322, 221352, 221364, 221378, 221405, 221425, 221430, 221462, 221472, 221485, 221503, 221522, 221537, 221562, 221579, 221605, 221619, 221620, 221633, 221634, 221652, 221691, 221696, 221747, 221874, 221881, 221908, 221950, 221984, 222025, 222048, 222100, 222111, 222141, 222163, 222182, 222212, 222239, 222252, 222261, 222291, 222311, 222320, 222361, 222385, 222403, 222416, 222417, 222437, 222448, 222493, 222516, 222538, 222573, 222728, 222744, 222761, 222788, 222809, 222822, 222849, 222875, 222901, 222924, 222946, 222968, 222989, 223016, 223043, 223069, 223097, 223122, 223155, 223156, 223165, 223201, 223224, 223253, 223284, 223302, 223319, 223336, 223351, 223378, 223405, 223413, 223527, 223545, 223588, 223636, 223656, 223690, 223738, 223763, 223771, 223788, 223820, 223865, 223903, 223914, 223922, 224050, 224064, 224118, 210254, 210307, 210348, 210398, 210438, 210467, 210499, 210514, 210524, 210547, 211068, 211136, 211180, 211213, 211258, 211294, 211335, 211443, 211444, 211876, 211922, 211962, 211998, 212036, 212067, 212096, 212097, 212131, 212149, 212525, 212627, 212674, 212744, 212789, 212826, 212866, 212879, 212895, 212932, 212961, 213401, 213446, 213498, 213531, 213591, 213616, 213633, 213649, 213942, 213975, 214003, 214031, 214056, 214057, 214081, 214101, 214112, 214124, 214410, 214433, 214456, 214483, 214508, 214533, 214560, 214570, 214584, 215019, 215054, 215099, 215149, 215215, 215247, 215279, 215310, 215333, 215355, 215867, 215922, 215950, 216001, 216035, 216072, 216086, 216106, 216107, 216123, 216221, 216607, 216650, 216686, 216718, 216772, 216814, 216845, 216846, 216892, 216929, 217201, 217318, 217352, 217408, 217423, 217454, 217498, 217524, 217557, 217577, 218041, 218100, 218142, 218198, 218230, 218267, 218303, 218331, 218351, 218362, 218592, 218618, 218660, 218693, 218702, 218739, 218752, 218774, 218799, 218823, 219168, 219198, 219231, 219259, 219297, 219313, 219347, 219376, 219393, 219823, 219887, 219939, 219990, 219997, 220008, 220045, 220088, 220119, 220160, 220171, 220663, 220699, 220741, 220779, 220823, 220873, 220905, 220942, 220962, 221000, 221446, 221504, 221538, 221592, 221635, 221672, 221718, 221741, 221777, 221803, 221822, 222362, 222418, 222461, 222507, 222539, 222586, 222631, 222658, 222676, 223190, 223241, 223295, 223327, 223363, 223392, 223414, 223441, 223466, 223797, 223821, 223855, 223887, 223923, 223953, 223975, 223981, 224000, 153199, 153200, 153201, 153202, 153203, 153204, 153205, 153206, 153207, 153208, 160311, 172323, 180436, 199310, 221204, 221205, 221206, 221250, 221276, 221277, 221278, 221279, 221280, 221281, 221282, 221290, 221303, 221304, 221353, 221365, 221379, 221380, 221381, 221406, 221407, 221408, 221409, 221431, 221432, 221433, 221434, 221473, 221512, 221513, 221539, 221540, 221541, 221571, 221580, 221581, 221582, 221593, 221594, 221616, 221621, 221644, 221791, 221844, 221855, 221856, 221861, 221862, 221863, 221875, 221897, 221898, 221909, 221916, 221917, 221918, 221951, 221970, 221985, 221986, 221987, 221996, 222040, 222041, 222042, 222049, 222071, 222086, 222087, 222088, 222089, 222112, 222113, 222114, 222126, 222127, 222128, 222129, 222142, 222143, 222153, 222164, 222183, 222213, 222220, 222240, 222262, 222263, 222264, 222277, 222278, 222331, 222332, 222346, 222347, 222348, 222363, 222364, 222377, 222386, 222404, 222419, 222438, 222439, 222473, 222482, 222494, 222508, 222528, 222710, 222713, 222724, 222735, 222738, 222745, 222762, 222763, 222764, 222769, 222770, 222789, 222790, 222791, 222792, 222815, 222823, 222824, 222832, 222833, 222850, 222851, 222866, 222867, 222876, 222877, 222878, 222889, 222890, 222891, 222902, 222903, 222911, 222925, 222926, 222927, 222947, 222957, 222969, 222976, 222990, 223002, 223003, 223004, 223005, 223006, 223028, 223044, 223045, 223060, 223061, 223087, 223110, 223123, 223139, 223177, 223178, 223191, 223225, 223242, 223269, 223296, 223320, 223352, 223564, 223570, 223604, 223621, 223649, 223662, 223691, 223708, 223739, 223760, 223793, 223809, 223822, 223839, 223915, 224001, 224002, 224073, 224105, 153375, 153376, 153377, 153378, 153379, 153380, 153381, 153382, 153383, 153384, 199214, 224087, 224088, 224089, 224090, 224091, 224092, 224093, 224097, 224098, 224099, 224100, 224101, 224102, 224106, 224107, 224108, 224109, 224110, 224111, 224114, 224115, 224119, 224120, 224121, 224122, 224123, 224124, 224125, 222247, 222271, 222272, 222293, 222294, 222307, 222314, 222315, 222343, 222356, 222357, 222383, 222411, 222412, 222428, 222443, 222444, 222457, 222469, 222470, 222471, 222524, 222534, 222550, 222561, 222601, 222610, 222640, 222667, 222669, 222673, 222690, 222691, 222693, 222698, 222705, 222712, 222716, 222718, 222722, 222723, 222726, 222731, 222734, 222736, 222756, 222758, 222782, 222798, 222799, 222845, 222863, 222884, 222935, 222965, 222973, 222985, 222998, 222999, 223009, 223023, 223054, 223083, 223091, 223092, 223105, 223106, 223118, 223145, 223146, 223163, 223197, 223211, 223232, 223233, 223234, 223247, 223248, 223249, 223278, 223279, 223280, 223324, 223340, 223347, 223358, 223371, 223385, 223402, 223417, 223422, 223427, 223451, 223474, 223475, 223486, 223488, 223490, 223495, 223496, 223501, 223504, 223505, 223509, 223511, 223515, 223517, 223519, 223521, 223525, 223528, 223530, 223531, 223534, 223562, 223595, 223602, 223603, 223618, 223619, 223626, 223632, 223646, 223653, 223659, 223695, 223711, 223719, 223732, 223749, 223766, 223767, 223775, 223776, 223782, 223791, 223792, 223837, 223851, 223854, 223862, 223877, 223880, 223886, 223888, 223889, 223900, 223908, 223909, 223920, 223928, 223935, 223936, 223942, 223951, 223956, 223963, 223964, 223980, 224004, 224007, 224014, 224021, 224025, 224026, 224030, 224033, 224038, 224040, 224044, 224046, 224048, 224053, 224054, 224071, 224094, 224112, 153430, 153431, 153432, 153433, 153434, 153435, 153436, 153437, 153438, 153439, 153440, 153441, 153442, 153443, 153444, 153445, 153446, 153447, 153448, 153449, 153450, 153451, 153452, 153453, 153454, 153455, 153456, 153457, 153458, 153459, 153460, 153461, 153462, 153463, 153464, 153465, 153466, 153467, 153468, 162179, 172317, 183115, 192735, 203065, 213319, 223072, 153682, 153683, 153736, 166244, 166245, 166259, 173699, 174729, 174743, 178774, 178775, 178815, 178838, 182725, 182733, 182761, 191340, 191346, 191347, 191359, 191558, 191639, 191658, 191735, 191736, 191737, 192176, 196847, 196848, 200797, 200872, 203427, 204463, 204464, 204465, 205241, 205242, 205243, 208186, 208187, 208188, 208344, 208392, 208393, 208415, 208709, 209753, 209754, 210293, 211307, 211316, 211334, 211354, 217702, 217711, 217792, 221271, 223325, 223334, 223348, 223349, 222582, 222583, 222584, 222585, 222590, 222611, 222626, 222627, 222628, 222629, 222630, 222635, 222641, 222642, 222643, 222644, 222647, 222648, 222649, 222653, 222654, 222655, 222662, 222670, 222674, 222675, 222685, 222686, 222687, 222695, 222699, 222700, 222701, 222706, 222707, 222708, 222709, 222711, 222715, 222719, 222720, 222721, 222752, 222783, 222821, 222846, 222864, 222885, 222897, 222910, 222942, 222953, 222954, 222966, 223010, 223024, 223025, 223055, 223056, 223067, 223084, 223085, 223093, 223135, 223136, 223137, 223147, 223148, 223149, 223150, 223151, 223172, 223173, 223174, 223185, 223186, 223198, 223199, 223200, 223212, 223220, 223221, 223235, 223236, 223237, 223250, 223263, 223264, 223281, 223282, 223341, 223359, 223360, 223372, 223403, 223412, 223418, 223419, 223423, 223428, 223429, 223440, 223446, 223452, 223456, 223468, 223469, 223476, 223478, 223479, 223480, 223482, 223491, 223492, 223498, 223499, 223502, 223506, 223507, 223514, 223526, 223532, 223536, 223537, 223551, 223563, 223567, 223620, 223633, 223634, 223720, 223721, 223736, 223750, 223758, 223762, 223768, 223783, 223784, 223796, 223863, 223878, 223890, 223891, 223901, 223902, 223952, 223965, 223966, 223989, 223999, 224011, 224016, 224017, 224019, 224032, 224034, 224035, 224036, 224041, 224049, 224051, 224055, 224062, 224084, 224116, 224126, 219542, 219585, 219599, 219609, 219630, 219664, 219674, 219682, 219700, 219711, 219721, 219739, 219762, 219788, 219804, 219820, 219841, 219850, 219860, 219875, 219895, 219910, 219911, 219923, 219937, 219947, 219955, 219966, 219967, 219980, 219985, 220014, 220270, 220277, 220286, 220309, 220326, 220346, 220355, 220366, 220380, 220389, 220405, 220417, 220429, 220443, 220456, 220485, 220486, 220509, 220515, 220525, 220545, 220570, 220591, 220600, 220620, 220638, 220662, 220674, 220696, 220707, 220708, 220709, 220716, 220738, 220748, 220775, 220837, 220851, 220883, 220890, 220901, 221035, 221064, 221087, 221116, 221125, 221143, 221153, 221161, 221172, 221189, 221199, 221217, 221229, 221241, 221259, 221288, 221289, 221309, 221320, 221332, 221348, 221349, 221375, 221391, 221422, 221423, 221443, 221461, 221491, 221501, 221519, 221532, 221533, 221570, 221588, 221643, 221893, 221904, 221914, 221933, 221947, 221961, 221962, 221992, 222010, 222021, 222038, 222056, 222081, 222082, 222097, 222122, 222139, 222168, 222180, 222210, 222233, 222237, 222249, 222276, 222297, 222309, 222330, 222345, 222359, 222375, 222399, 222414, 222429, 222445, 222458, 222480, 222671, 222767, 222777, 222784, 222785, 222807, 222814, 222831, 222847, 222865, 222872, 222886, 222898, 222921, 222943, 222955, 222967, 222974, 223000, 223011, 223026, 223041, 223057, 223068, 223073, 223074, 223094, 223107, 223119, 223152, 223164, 223187, 223213, 223222, 223265, 223266, 223574, 223609, 223654, 223660, 223670, 223688, 223696, 223705, 223722, 223733, 223737, 224113)) AND (unread != 0);

So it seems somewhere some old id is picked to mark all even older articles as read and with the next check to see if there are any unread items the database returns the same articles again as they were never marked read.

@SMillerDev
Copy link
Contributor

Can you check if #1339 changes that?

@macearl
Copy link

macearl commented May 24, 2021

that seems to have done the trick, at least for me.
The generated query now selects the correct ids and marks them as read.

Let's see if it works for everyone else as well

@Grotax Grotax linked a pull request May 24, 2021 that will close this issue
@mhzawadi
Copy link

have made the changes to lib/Db/ItemMapperV2.php and they look promising, will see in the morning if they work

@mhzawadi
Copy link

can report that this not only fixes the web, but also the news app from f-droid

@albatros69
Copy link
Author

Hello @SMillerDev, all,

Can you check if #1339 changes that?

As already reported, applying this on my NC instance seems to do the trick for me: "Mark as read" is working again and I can't see any weird discrepancies on the unread counts between the web interface and the News Android app anymore.

Thanks for the hard work!

@asmw
Copy link

asmw commented May 29, 2021

15.4.5 solves the problem for me.

Thank you!

@9R
Copy link

9R commented Jun 1, 2021

After updating to 15.4.5 marking entries as read in android news app works with my server now, but the issue is still present when using newsboat as client.
i have opened a related issue with newsboat. ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug frontend impact Javascript/Frontend code
Projects
None yet
Development

Successfully merging a pull request may close this issue.