Skip to content

malformed entries in the activity tables for approval events #268

@maximelehericy

Description

@maximelehericy

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.

Steps to reproduce

  1. request and accept an approval

Expected behaviour

In the activity tab, we should see details about the workflow

Actual behaviour

Rich subject or a parameter for "You requested approval on {file}" is malformed

Image

Server configuration

Web server: Apache/Nginx

Database: MySQL/Maria/SQLite/PostgreSQL

PHP version: 8.1/8.2/8.3

Nextcloud version: (see Nextcloud admin page)

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

Browser

Browser name: Firefox/Chrome/Safari/…

Browser version: 124/125/…

Operating system: Windows/Ubuntu/Mac/…

Browser log

complete log is:

{"reqId":"mtcI10tkOzyjRGyL4qb9","level":3,"time":"2025-03-05T16:49:34+00:00","remoteAddr":"172.19.1.0","user":"admin","app":"activity","method":"GET","url":"/ocs/v2.php/apps/activity/api/v2/activity/filter?format=json&object_type=files&object_id=4229","message":"Object is invalid, value 4229 is not a string","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"31.0.0.18","exception":{"Exception":"OCP\RichObjectStrings\InvalidObjectExeption","Message":"Object is invalid, value 4229 is not a string","Code":0,"Trace":[{"file":"/var/www/html/lib/private/RichObjectStrings/Validator.php","line":59,"function":"validateParameter","class":"OC\RichObjectStrings\Validator","type":"->","args":[{"type":"file","id":4229,"name":"test approval.odt","path":"/Documents/test approval/test approval.odt"}]},{"file":"/var/www/html/apps/activity/lib/GroupHelper.php","line":74,"function":"validate","class":"OC\RichObjectStrings\Validator","type":"->","args":["Your approval was requested on {file} by {who}",{"user":{"type":"user","id":"admin","name":"admin"},"file":{"type":"file","id":4229,"name":"test approval.odt","path":"/Documents/test approval/test approval.odt"},"who":{"type":"user","id":"admin","name":"admin"}}]},{"file":"/var/www/html/apps/activity/lib/GroupHelper.php","line":46,"function":"addEvent","class":"OCA\Activity\GroupHelper","type":"->","args":[2065,{"class":"OC\Activity\Event"}]},{"file":"/var/www/html/apps/activity/lib/Data.php","line":231,"function":"addActivity","class":"OCA\Activity\GroupHelper","type":"->","args":[{"0":"And 10 more entries, set log level to debug to see all entries","activity_id":2065,"timestamp":1741192814,"priority":30,"type":"approval","user":"admin"}]},{"file":"/var/www/html/apps/activity/lib/Controller/APIv2Controller.php","line":189,"function":"get","class":"OCA\Activity\Data","type":"->","args":[{"class":"OCA\Activity\GroupHelper"},{"class":"OCA\Activity\UserSettings"},"admin",0,20,"desc","filter","files",4229]},{"file":"/var/www/html/apps/activity/lib/Controller/APIv2Controller.php","line":136,"function":"get","class":"OCA\Activity\Controller\APIv2Controller","type":"->","args":["filter",0,50,false,"files",4229,"desc"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"getFilter","class":"OCA\Activity\Controller\APIv2Controller","type":"->","args":["filter",0,50,false,"files",4229,"desc"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Activity\Controller\APIv2Controller"},"getFilter"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Activity\Controller\APIv2Controller"},"getFilter"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Activity\Controller\APIv2Controller","getFilter",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"filter":"filter","_route":"ocs.activity.apiv2.getfilter"}]},{"file":"/var/www/html/ocs/v1.php","line":49,"function":"match","class":"OC\Route\Router","type":"->","args":["/ocsapp/apps/activity/api/v2/activity/filter"]},{"file":"/var/www/html/ocs/v2.php","line":7,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/RichObjectStrings/Validator.php","Line":85,"message":"Object is invalid, value 4229 is not a string","exception":[],"CustomMessage":"Object is invalid, value 4229 is not a string"},"id":"67c88106a4438"}

Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...

in the DB, in oc_activity.subjectparams I have this:

{"node":{"id":4229,"name":"test approval.odt"},"author":"A guest user","origin_user_id":"admin"}

whereas all other entries have this:

[{"4229":"/Documents/test approval/test approval.odt"},"admin"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions