Adding attachment requires Files_Sharing to be enabled
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
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
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
- Disable
Files_Sharingapp - Go to deck, try to attach file
- 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
Client details:
- OS: Ubuntu 22.10, Docker image
nextcloud:apache:latest - Browser Brave macOS
- Version v1.50.121
- Device: macOS Ventura 13.3.1
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": "--"
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the attachment failure with Files_Sharing disabled, then start with custom_apps/deck/lib/Service/FilesAppService.php at line 207 and AttachmentService.php at line 212. Trace the call into lib/private/Share20/Manager.php line 799 and the AttachmentController entry point. Done means a non-shared file can be attached, or the stated missing-app error is shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100