richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Unable to open a template files (ott, ots, otp, otg) with Collabora Online / Nextcloud Office

Open Jerome-Herbinet opened this issue 2 years ago • 10 comments

Hello,

Describe the bug When you have an ott, ots, otp or otg file in Nextcloud Files and you click on it, the file downloads but does not open in the Collabora Online / Nextcloud Office suite.

To Reproduce

  1. Make sure you have an ott, ots, otp or otg file in your Nextcloud Files
  2. Click on it (with the intention of opening it)

Expected behavior The file should open in Collabora Online / Nextcloud Office, but it does not. Instead, its download starts (browser).

Client details:

  • OS: Ubuntu 20.04 LTS
  • Browser: Firefox 102.0
  • Device: Laptop

Server details

Operating system: Ubuntu

Web server: Apache

Database: MySQL

PHP version: 8.0.21

Nextcloud version: 24.0.3

Versions: COOLWSD : 22.05.4.1 Collabora Office 22.05.4.1 Nextcloud Office 6.1.1

Logs can be provided if necessary.

Warning : I have seen this problem on my personal Nextcloud instance of which you have the technical details and version numbers. I have seen it on several other test and production instances (Nextcloud 22, 23 and 24). Always the same behaviour.

My conclusion on this situation: Whether it's a bug or a feature, I think it's annoying for the average user who wants to create and modify his models.

Best regards, Jérôme

Jerome-Herbinet avatar Jul 21 '22 12:07 Jerome-Herbinet

In two words:

same here...

martin-77 avatar Sep 09 '22 13:09 martin-77

The template mimetypes need to be added to the richdocuments capabilities:

application/vnd.oasis.opendocument.text-template
application/vnd.oasis.opendocument.spreadsheet-template
application/vnd.oasis.opendocument.presentation-template
etc.

Raudius avatar Oct 03 '22 12:10 Raudius

@Raudius Could you maybe check if Collabora handles opening and saving those properly? Iirc there was an issue with that some time ago.

There was also a fix to address this for the create from template case, I'll see if I can find that.

juliushaertl avatar Oct 17 '22 12:10 juliushaertl

Template files seem to get opened in read only mode, so maybe that is something to discuss with Collabora.

juliushaertl avatar Oct 17 '22 12:10 juliushaertl

@Jerome-Herbinet @martin-77: Can you please share more info about your use case? What do you need to achieve?

Asking because it is unclear - do you want to start a new document from the template? Or do you rather want to edit the template itself?

If it is the former (create document from the template) - then it should be possible to start a workflow similar to the existing "Create from Template" functionality; ie. when the user clicks the OTT / OTS / ..., they are presented with a dialog asking for the (new) document name, and then the document is created from that template. I suppose @jancborchardt can add more details.

If it is the latter (editing the template itself) - then it is a bit hard, because of the behavior of the core (and exactly this dichotomy between using and editing the template).

Thank you in advance!

kendy avatar Oct 18 '22 11:10 kendy

@Jerome-Herbinet @martin-77: Can you please share more info about your use case? What do you need to achieve?

Asking because it is unclear - do you want to start a new document from the template? Or do you rather want to edit the template itself?

If it is the former (create document from the template) - then it should be possible to start a workflow similar to the existing "Create from Template" functionality; ie. when the user clicks the OTT / OTS / ..., they are presented with a dialog asking for the (new) document name, and then the document is created from that template. I suppose @jancborchardt can add more details.

If it is the latter (editing the template itself) - then it is a bit hard, because of the behavior of the core (and exactly this dichotomy between using and editing the template).

Thank you in advance!

@kendy For example, there is no problem to create an odt file from an ott template if it is in my personal templates folder (my templates folder configured after clicking on [+] and then on "Set up templates folder"). But the problem is that if I want to modify the template (in order to make it evolve over time), when I click on it in Nextcloud Files in order to open and to edit it (whether that file is in my templates folder or elsewhere), it doesn't open in Collabora Online / Nextcloud Office, it just gets downloaded by my browser. I remain at your disposal.

Jerome-Herbinet avatar Oct 18 '22 12:10 Jerome-Herbinet

Thanks for asking!

The idea was, to open the template directly from the target-folder and create a new odt with a new filename. You are right, that this can be achieved by defining the correct template-folder, klick "+" and then create the new odt file. But to be honest - my employees will never be able to do this. Sad, but true. In order to lower the barriers it would be nice, if they could interact with templates as they are used to (from operating systems like windows/mac/linux)

My workflow would be the following:

  1. I generate the template and share the file (ro),
  2. the employee opens it inside the share, is forced to enter a new filename, edits the new file, saves and exits.

The ablility to edit the template file inside nextcloud is not, what I was looking for.

Thanks in advance!

martin-77 avatar Oct 18 '22 18:10 martin-77

Hi @juliushaertl, will you or your team talk with Collabora Team about it or do you suggest opening an issue in the Collabora project ? Thanks for telling me what's gonna be the most efficient way to get this fixed. Thanks.

Jerome-Herbinet avatar Feb 03 '23 14:02 Jerome-Herbinet

When opening an template file, tested this with an .otp, I also expected the file te open with Nextcloud Office so I could edit the template. This is also how I do this using LibreOffice on the desktop.

So, could it be a solution to move the "Edit Template" option to the file hamburger menu for these specific file types. Users working from the /Templates folder and clicking a template file would as suggested prompt the user for a new name to create a doc from that template (in line with what the + button does, but would be a longer route).

I like the idea of RO templates that are shared and also trigger theto prompt the user for a new name to create a doc from that template. This way (template) "admins" can decide who is able to modify those templates and so could make the "Edit Template" option visible in the file hamburger menu.

sebastiaanveld avatar Jan 08 '24 08:01 sebastiaanveld

I think this is a very nice proposal. 👍

Should then all be possible to implement within richdocuments.

juliushaertl avatar Jan 08 '24 10:01 juliushaertl