-
Notifications
You must be signed in to change notification settings - Fork 186
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
Only one item marked as read when executing "mark items of a feed as read" using legacy API v1-2 #1544
Comments
I'm also experiencing this issue, here is my server log as the above mentioned he accidentally deleted his. :) (Sorry not sure how to make the formatting better.) `OCA\News\Service\Exceptions\ServiceNotFoundException: Did expect one result but found none when executing: query "SELECT 'items'.* FROM 'PREFIXnews_items' 'items' INNER JOIN 'PREFIXnews_feeds' 'feeds' ON items.feed_id = feeds.id WHERE (feeds.user_id = :user_id) AND (items.id = :item_id) AND (feeds.deleted_at = 0)";
Caused by OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I don't see any changes in the relevant code, so I expect this issue still exists. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Fixed |
Explain the Problem
When using the mark items of a feed as read functionality of the v1-2 API, only one item is marked as read (always the same one).
I think I found the cause. The read function on the FeedApiController takes a
feedId
andnewestItemId
which it then passes as anitemId
and aread
boolean to a function on the ItemServiceV2 (which seems to only mark one item as read).news/lib/Controller/FeedApiController.php
Lines 153 to 156 in c7a265f
news/lib/Service/ItemServiceV2.php
Lines 137 to 145 in c7a265f
I did not test with an older version of News, but it looks like this issue got introduced in b4fa772#diff-86a6e0a2c13497fea6daedeef4f01f06e9361023cd9c999fe60a49a962e77bc3R154
Steps to Reproduce
After following these steps, all items in the feed show up as unread again.
In case it is useful, a screenshot of a Wireshark trace of the transactions (relevant request:
PUT /index.php/apps/news/api/v1-2/feeds/1/read?newestItemId=9223372036854775807 HTTP/1.1
):System Information
uname -a
-> "Linux 40f091d8901b 5.14.6-arch1-1")Contents of nextcloud/data/nextcloud.log
Contents of Browser Error Console
The text was updated successfully, but these errors were encountered: