nextcloud / nextcloud/richdocuments
richdocuments ignores custom webroot
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 147
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 83
Description
Describe the bug
I cannot get nextcloud to open files via collabora. Whenever it tries to do so, it completely ignores my specified webroot and thus hits a 404 (it tries to get https://domain.com/custom_apps/richdocuments/... instead of https://domain.com/cloud/custom_apps/richdocuments/...). It's been months since I first discovered this, but it still hasn't been fixed sadly.
I've already tried using a standalone collabora server instead of the app, but no luck there either. The config has
'overwritewebroot' => '/cloud',
'overwrite.cli.url' => 'https://domain.com/cloud'
To Reproduce
Open a collabora document
Expected behavior
It should apply a custom webroot, /cloud in my case.
Client details:
- OS: Arch Linux
- Browser: Floorp
- Version: 11.7.1
- Device: Desktop
Server details
https://hub.docker.com/_/nextcloud/ (the official AIO image is a PITA to set up and has its fingers where I don't want them. Also kinda forces me to test on prod, so I'm not a fan)
Operating system: Arch linux
Web server: Whatever came with the docker image
Database: MariaDB
PHP version:
Nextcloud version: Whatever came with the docker image
Version of the richdocuments app latest, at this point it doesn't even seem to matter anymore...
Version of Collabora Online also latest
Configuration of the richdocuments app
{
"apps": {
"richdocuments": {
"canonical_webroot": "",
"disable_certificate_verification": "yes",
"enabled": "yes",
"external_apps": "",
"installed_version": "8.2.4",
"public_wopi_url": "https:\/\/domain.com\/cloud\/custom_apps\/richdocumentscode\/proxy.php?req=",
"types": "prevent_group_restriction",
"wopi_allowlist": "",
"wopi_url": "https:\/\/domain.com\/cloud\/cloud\/custom_apps\/richdocumentscode\/proxy.php?req="
}
}
}
Logs
Nextcloud log (data/nextcloud.log)
file too big?
https://chonkyrabbit.eu/files/_share/SArXp-nextcloud.log
Browser log
POST
https://domain.com/custom_apps/richdocumentscode/proxy.php?req=/browser/f76e08a/cool.html?WOPISrc=https://domain.com/cloud/index.php/apps/richdocuments/wopi/files/1399_oc2zcelp23cu&title=/foovar.odp&lang=en&closebutton=1&revisionhistory=1
Status
404
Not Found
VersionHTTP/2
Transferred918 B (643 B size)
Referrer Policyno-referrer
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
Start with the browser request to custom_apps/richdocumentscode/proxy.php and the overwritewebroot and overwrite.cli.url settings shown in the report. Trace how the richdocuments WOPI and proxy URLs are assembled, then reproduce by opening a Collabora document. Done means the generated proxy URL includes /cloud and no longer returns 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, mariadb
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100