nextcloud / nextcloud/richdocuments
Ability to open files with Collabora if onlyoffice app is installed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 147
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 83
Description
Describe the bug
If richdocuments detects onlyoffice app, it completely disables handling of any documents which are also compatible with onlyoffice. This shouldn't be the correct approach, since it effectively allows only a few extensions to be handled by richdocuments and the user has no way of opening file with those disabled extension with Collabora.
Furtermore, onlyoffice allows to open any documents from the context menu so the correct approach would be to have richdocuments handle all office documents by default and if user want's to open a document with onlyoffice, he can do so by opening the context menu and selecting the option to open onlyoffice.
The code which handles this is in file:
./lib/Service/CapabilitiesService.php
Deleting/commenting out this section fixes the issue
if ($this->appManager->isEnabledForUser('onlyoffice')) {
return true;
}
To Reproduce
Steps to reproduce the behavior:
- install onlyoffice app (no need to configure it)
- Click on any document which is supported by onlyoffice (docx, xlsx etc.)
- Documents either open with onlyoffice (if correctly configured), or a download dialog appears
Expected behavior
If the document is supported by richdocuments it should open Collabora. If user wants to open it with onlyoffice, he can do so by selecting the appropriate option in the context menu.
Client details:
- OS: Debian 12 - Bookworm
- Browser: any
- Version: any
- Device: desktop
Server details
Operating system: Debian 12 Bookworm / Docker install (latest)
**Web server: Apache/2.4.57 (Debian) / within docker
**Database: Mariadb, docker image version latest (11.2.2)
**PHP version: php 8.2.15
**Nextcloud version: 8.0.2
**Version of the richdocuments app: 8.3.1
**Version of Collabora Online: 23.05.8.4
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 in lib/Service/CapabilitiesService.php and inspect the capability check around appManager->isEnabledForUser('onlyoffice'). Reproduce with OnlyOffice installed and a supported office document, then verify that richdocuments opens it with Collabora while the context menu still provides an OnlyOffice option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100