Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#8,591 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php
Área
backend

Línea de trabajo

Lee lib/Activity/DeckProvider.php e inspecciona OCA\Deck\Activity\DeckProvider::setSubjects(), especialmente la llamada final a setSubject(). El issue informa de que eliminar esta llamada detiene los errores de formato de las notificaciones y conserva la salida del flujo de Activity y del correo electrónico. Confirma el cambio con una prueba que cubra las notificaciones de campana para un evento de Deck cuyo asunto traducido supere los 64 bytes; se considera terminado cuando la notificación se renderiza y IEvent::getSubject() conserva su clave corta.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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) ...
Lenguaje dominante
JavaScript
Estrellas
1.4k
Forks
360
Merge medio
2 d 13 h
PR fusionados (30 d)
118

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextcloud/deck

Todos los issues de nextcloud/deck

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.