nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.22k stars 278 forks source link

Adding attachment requires Files_Sharing to be enabled #4605

Open itsthejb opened 1 year ago

itsthejb commented 1 year ago

How to use GitHub

Describe the bug

The Files_Sharing app is required in order to attach a file to a card. This is even if no sharing is required.

To Reproduce

  1. Disable Files_Sharing app
  2. Go to deck, try to attach file
  3. Fails with error (more info in logs)

Expected behavior Should be possible to attach a (non-shared) file to a Deck card. At least, better behaviour would be to show a more useful error message: "Files_Sharing app must be enabled to attach a file"

Screenshots

Screenshot 2023-04-20 at 11 24 50

Client details:

Server details Error log: ``` { "reqId": "C94z0CvHJVLpD7wPCxat", "level": 3, "time": "2023-04-20T11:17:19+01:00", "remoteAddr": "172.10.0.27", "user": "itsthejb", "app": "deck", "method": "POST", "url": "/apps/deck/cards/254/attachment", "message": "Class \"OCA\\Files_Sharing\\AppInfo\\Application\" not found in file '/var/www/html/lib/private/Share20/Manager.php' line 799", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", "version": "26.0.0.11", "exception": { "Exception": "Exception", "Message": "Class \"OCA\\Files_Sharing\\AppInfo\\Application\" not found in file '/var/www/html/lib/private/Share20/Manager.php' line 799", "Code": 0, "Trace": [ { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 183, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Deck\\Controller\\AttachmentController" ], "create" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Deck\\Controller\\AttachmentController", "create", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "254", "deck.attachment.create" ] ] }, { "file": "/var/www/html/lib/base.php", "line": 1055, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/deck/cards/254/attachment" ] }, { "file": "/var/www/html/index.php", "line": 36, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "Line": 169, "Previous": { "Exception": "Error", "Message": "Class \"OCA\\Files_Sharing\\AppInfo\\Application\" not found", "Code": 0, "Trace": [ { "file": "/var/www/html/custom_apps/deck/lib/Service/FilesAppService.php", "line": 207, "function": "createShare", "class": "OC\\Share20\\Manager", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/var/www/html/custom_apps/deck/lib/Service/AttachmentService.php", "line": 212, "function": "create", "class": "OCA\\Deck\\Service\\FilesAppService", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/var/www/html/custom_apps/deck/lib/Controller/AttachmentController.php", "line": 71, "function": "create", "class": "OCA\\Deck\\Service\\AttachmentService", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 230, "function": "create", "class": "OCA\\Deck\\Controller\\AttachmentController", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 137, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Deck\\Controller\\AttachmentController" ], "create" ] }, { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 183, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Deck\\Controller\\AttachmentController" ], "create" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Deck\\Controller\\AttachmentController", "create", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "*** sensitive parameters replaced ***", "deck.attachment.create" ] ] }, { "file": "/var/www/html/lib/base.php", "line": 1055, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/deck/cards/254/attachment" ] }, { "file": "/var/www/html/index.php", "line": 36, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/html/lib/private/Share20/Manager.php", "Line": 799 }, "CustomMessage": "--" } } ```
user8446 commented 10 months ago

I have noticed that the file actually saves in the Deck folder, it just does not appear as an attachment on the card.

joshtrichards commented 1 month ago

Related: #2014