DeckProvider::setSubjects() overwrites IEvent subject with translated sentence → InvalidValueException, Deck bell notifications silently dropped
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
Hướng nghiên cứu
Đọc lib/Activity/DeckProvider.php và kiểm tra OCA\Deck\Activity\DeckProvider::setSubjects(), đặc biệt là lời gọi setSubject() cuối cùng. Issue cho biết việc bỏ lời gọi này sẽ ngăn lỗi định dạng thông báo, đồng thời giữ nguyên nội dung của luồng Activity và email. Xác nhận thay đổi bằng một bài kiểm tra bao quát thông báo chuông cho một sự kiện Deck có tiêu đề đã dịch dài hơn 64 byte; hoàn tất khi thông báo được hiển thị và IEvent::getSubject() vẫn giữ khóa ngắn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
OCA\Deck\Activity\DeckProvider::setSubjects() ends with
$event->setParsedSubject(str_replace($placeholders, $replacements, $subject)) ->setRichSubject($subject, $richParameters); $event->setSubject($subject, $parameters);
The last call replaces the short subject key stored in oc_activity (e.g. card_update_description) with the translated human‑readable sentence. When the Activity app renders a bell notification (activity_notification), OCA\Activity\NotificationGenerator::getNotificationForEvent() copies $event->getSubject() into INotification::setSubject(), which rejects any subject longer than 64 bytes (isset($subject[64]) in lib/private/Notification/Notification.php).
Activity logs Failed to format activity notification and throws AlreadyProcessedException, so the Notification manager deletes the notification. Result: users never see those Deck events in the notification bell, and the log receives one error entry per affected event on every poll.
In English this hits every event whose template exceeds 64 characters, e.g. card_update_description (“{user} has updated the description of card {card} in list {stack} on board {board}”, 82 chars). In languages with multi‑byte characters (Russian, Greek, CJK, …) practically all Deck sentences exceed 64 bytes, so Deck bell notifications are effectively broken for those users.
The setSubject() call is unnecessary: parsed and rich subjects are already set, and no other provider in server or activity overwrites the raw subject. The same line is still present in main (lib/Activity/DeckProvider.php). Possibly related: #8116.
To Reproduce
- Nextcloud 34.0.5, Deck 1.18.6, Activity and Notifications apps enabled.
- User A and user B share a board; B is assigned to a card. In B's Settings → Notifications the Deck row “card description changes” has Notification enabled (default).
- User A edits the description of that card.
- User B opens the bell (or any client polls GET /ocs/v2.php/apps/notifications/api/v2/notifications).
Result: the notification never appears for B, and nextcloud.log gets the entry below. The event is visible in B's Activity stream and e‑mails (those use parsed/rich subject, not the raw one).
Expected behavior
The notification is rendered and shown; IEvent::getSubject() keeps the short key.
Proposed fix
Remove the line $event->setSubject($subject, $parameters); from DeckProvider::setSubjects(). Verified locally on Deck 1.18.6: after commenting out this single line the exception no longer occurs and Activity stream, e‑mails and bell notifications render identically.
` $event->setParsedSubject(str_replace($placeholders, $replacements, $subject))
->setRichSubject($subject, $richParameters);
-
}`$event->setSubject($subject, $parameters);
Screenshots
If applicable, add screenshots to help explain your problem.
Client details:
-Nextcloud Server: 34.0.5.1 (custom_apps install path)
-Deck: 1.18.6 (latest available in the App Store at report time)
-Activity: bundled with 34.0.5; Notifications: bundled with 34.0.5
-PHP: 8.3 (php8.3-fpm) · Web server: Apache 2.4 · Database: MariaDB
-Clients: web UI (Chrome 155 on Windows 10)
Operating system:
Ubuntu 22.04.5 LTS
Web server:
Server version: Apache/2.4.69 (Ubuntu)
Database:
mysql Ver 15.1 Distrib 10.6.23-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
PHP version:
PHP 8.3.36 (cli) (built: Oct 21 2026 14:31:50) (NTS)
Nextcloud version: (see Nextcloud admin page)
version: 34.0.5.1
Where did you install Nextcloud from:
bae metal
Signing status:
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration:
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Logs
#### Log entry{"reqId":"SyslQZoKhzgf7PSFkH7t","level":3,"time":"2026-10-23T14:11:41+03:00","app":"activity","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Failed to format activity notification","version":"34.0.5.1","exception":{"Exception":"OCP\\Notification\\InvalidValueException","Message":"Value provided for subject is not valid","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/activity/lib/NotificationGenerator.php","line":65,"function":"setSubject","class":"OC\\Notification\\Notification","type":"->"},{"file":"/var/www/html/nextcloud/apps/activity/lib/NotificationGenerator.php","line":139,"function":"getNotificationForEvent","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/html/nextcloud/apps/activity/lib/NotificationGenerator.php","line":131,"function":"getDisplayNotificationForEvent","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Notification/Manager.php","line":351,"function":"prepare","class":"OCA\\Activity\\NotificationGenerator","type":"->"},{"file":"/var/www/html/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":105,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"}],"File":"/var/www/html/nextcloud/lib/private/Notification/Notification.php","Line":157}}
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 360
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 114
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/deck
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CSV export leaves trailing commas in tags and assigned-user fieldsCó thể đã có người làm @Kumar-s75 đã nhận 44 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Board clone API failure is treated as a successful board responseCó thể đã có người làm @Kumar-s75 đã nhận 44 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/deck#8334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
1. to develop bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/deck#8146 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/deck
Issue tương tự
-
bug Frontend P2-medium UI UX
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
Deepak3699/Ai_Mentor#427 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
11ty/buildawesome#4407 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
keyxmakerx/Chronicle#1711 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
uoftblueprint/canada-basketball#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New App Request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
ThatGuySam/doesitarm#1126 · 1 bình luận ·