DeckProvider::setSubjects() overwrites IEvent subject with translated sentence → InvalidValueException, Deck bell notifications silently dropped
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 74/100
Rechercherichtung
Lies lib/Activity/DeckProvider.php und untersuche OCA\Deck\Activity\DeckProvider::setSubjects(), insbesondere den abschließenden Aufruf von setSubject(). Laut Issue verhindert das Entfernen dieses Aufrufs Formatierungsfehler bei Benachrichtigungen, während der Activity-Stream und die E-Mail-Ausgabe erhalten bleiben. Bestätige die Änderung mit einem Test für Glockenbenachrichtigungen zu einem Deck-Ereignis, dessen übersetzter Betreff 64 Bytes überschreitet; fertig ist es, wenn die Benachrichtigung gerendert wird und IEvent::getSubject() seinen kurzen Schlüssel behält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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) ...
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.4k
- Forks
- 360
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 118
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nextcloud/deck
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
CSV export leaves trailing commas in tags and assigned-user fieldsEvtl. vergeben @Kumar-s75 hat das vor 45 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Board clone API failure is treated as a successful board responseEvtl. vergeben @Kumar-s75 hat das vor 45 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nextcloud/deck#8334 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
1. to develop bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nextcloud/deck#8146 · 2 Kommentare · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CloudredirectOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
0.2.1-rc.3 compatibility: 21 peer ranges enumerate exact versions, so rc.3 is rejectedEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
NanmiCoder/dsh-agent-teams#277 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[ordering-review] workshop order graph: 1 confirmed ordering problem, 3 cycles are false positivesOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
githubnext/gh-aw-workshop#4943 ·
Maintainer antworten meist innerhalb von 1 Tag