Ability to open files with Collabora if onlyoffice app is installed

Open Beginner friendly
#3,456 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
backend

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.

Description

0. Needs triage bug integration

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:

  1. install onlyoffice app (no need to configure it)
  2. Click on any document which is supported by onlyoffice (docx, xlsx etc.)
  3. 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

Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 35m
Merged PRs (30d)
85

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/richdocuments

All issues in nextcloud/richdocuments

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.