Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

DeckProvider::setSubjects() overwrites IEvent subject with translated sentence → InvalidValueException, Deck bell notifications silently dropped

Offen Anfängerfreundlich
#8,591 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
php
Bereich
backend

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

0. Needs triage bug
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

  1. Nextcloud 34.0.5, Deck 1.18.6, Activity and Notifications apps enabled.
  2. 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).
  3. User A edits the description of that card.
  4. 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)

Server details

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

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/deck

Alle Issues in nextcloud/deck

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.