Closed thebearon closed 1 year ago
We currently create new empty files by copying the empty file assets from https://github.com/nextcloud/richdocuments/tree/master/emptyTemplates since the file creating needs to be performed before calling Collabora. Would there be any benefit in still passing a TemplateSource in case of empty files?
One issue I noticed during reproducing #2697 was that Collabora seems to fail creating a odt file from a dotx template, so I assume we would need either separate template files or a fix in Collabora to make creating files from templates of different types possible. Is that a known limitation?
We currently create new empty files by copying the empty file assets from https://github.com/nextcloud/richdocuments/tree/master/emptyTemplates since the file creating needs to be performed before calling Collabora. Would there be any benefit in still passing a TemplateSource in case of empty files?
@kendy, what is your take on this?
One issue I noticed during reproducing #2697 was that Collabora seems to fail creating a odt file from a dotx template, so I assume we would need either separate template files or a fix in Collabora to make creating files from templates of different types possible. Is that a known limitation?
I checked this with a DOTX template in a local build, and had no problem with creating an ODT file based on it. Is there a sample DOTX you could share?
I've seen this with the following two template files added to the user template directory when testing with #2740
Test.dotx.zip presentation.potx.zip
TemplateSource is set, attached the coolwsd.log for that attempt where it seems the template file is properly downloaded
We currently create new empty files by copying the empty file assets from https://github.com/nextcloud/richdocuments/tree/master/emptyTemplates since the file creating needs to be performed before calling Collabora. Would there be any benefit in still passing a TemplateSource in case of empty files?
@kendy, what is your take on this?
The befit as I see it is that there would be just 1 code path that is used for creating files; so it would be much easier to spot problems with file creation - as it would appear already here.
Having said that, I suppose you cannot remove the "copy & then open" functionality from Nextcloud, as you are using that also for other file templates, like the .md and others - so I don't think it is necessary to change to the TemplateSource way of creating files here.
Yes, we will always have to copy a file due to the way Nextcloud file creation is structured so let's close this.
Collabora Online supports creating new files based on templates, for this the
CheckFileInfo
response needs aTemplateSource
property with the URL to the template (as it says here).However, when files created from default templates,
TemplateSource
isn't used. See the following log snippets from coolwsd with CheckFileInfo JSON, and note how one doesn't include aTemplateSource
entry.To Reproduce
CheckFileInfo
response in coolwsd logs for both cases.Note that step 2 fails in richdocuments 7.0.2 due to #2697.
Server details
Nextcloud version: 25.0.2 Version of the richdocuments app 7.0.1 or so Version of Collabora Online 22.05.x