nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
350 stars 116 forks source link

Collabora export pdf not working with spaces in filename #3185

Open malgam opened 1 year ago

malgam commented 1 year ago

Describe the bug With Nextcloud running as a snap on Ubuntu and with Nextcloud Office enabled with the CODE server, it is not possible to export a document to pdf format.

To Reproduce Steps to reproduce the behavior:

  1. Go to Files/Documents in Nextcloud web interface
  2. Click on '(+)/New document' and accept the default name (New document.odt)
  3. Add some text
  4. Click on 'File/Export As/PDF Document' and accept the default name (New document.pdf)
  5. Click 'Export' to accept the PDF Options
  6. Click on 'X' to close the document
  7. Refresh the Documents folder - no new pdf document appears!

Expected behavior

  1. Repeat the steps above, but change the document name to 'New_document.odt', or something else without any spaces
  2. After clicking 'Export' in step 5 above, a dialog box appears with 'Exported to Storage / Successfully exported: New_document.pdf'

Note that changing the name of the exported document doesn't seem to make any difference.

Screenshots image

Client details:

Server details

Operating system: Ubuntu 22.04

**Web server: See Nextcloud snap version 27.0.2snap1

**Database: See Nextcloud snap version 27.0.2snap1

**PHP version: See Nextcloud snap version 27.0.2snap1

**Nextcloud version: 27.02

**Version of the richdocuments app: Nextcloud Office 8.2.0

**Version of Collabora Online: CODE 23.5.301

Logs #### Nextcloud log (data/nextcloud.log) No new log entries shown in Nextcloud logging. Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
pidoff commented 1 year ago

Same problem. Running Debian 11 Bullseye and Apache2

juliushaertl commented 11 months ago

I cannot reprocuce this issue.Can you please check your Nextcloud and browser console for errors?

malgam commented 11 months ago

I just installed the Nextcloud snap on another Ubuntu 22.04 server, then installed Nextcloud Office and CODE apps. The Nextcloud version is now Hub 6 (27.1.1), the CODE version is 23.5.502 and Nextcloud Office version is 8.2.1.

The symptons described above were repeated. There were no new entries in the Nextcloud log and the following appeared in the browser console (Firefox 118.0.1) during the failed attempt to export the file with a space in the filename:

13:49:02.202 [viewer] Received post message Action_Save_Resp Object { success: false, result: "Could not upload document to storage", errorMsg: "" } false richdocuments-viewer.js:2:3958009 13:49:02.203 Error during post message handler Object { msgId: "Action_Save_Resp", args: {…}, deprecated: false } TypeError: t is undefined zt http://cloudie/dist/core-main.js?v=9407c8a6-0:2 naturalSortCompare http://cloudie/dist/core-main.js?v=9407c8a6-0:2 name http://cloudie/index.php/js/files/merged-index.js?v=9407c8a6-0:8173 _sortComparator http://cloudie/index.php/js/files/merged-index.js?v=9407c8a6-0:6333 _findInsertionIndex http://cloudie/index.php/js/files/merged-index.js?v=9407c8a6-0:6749 add http://cloudie/index.php/js/files/merged-index.js?v=9407c8a6-0:6077 saveAs http://cloudie/extra-apps/richdocuments/js/richdocuments-viewer.js?v=9407c8a6-0:2 postMessageHandler http://cloudie/extra-apps/richdocuments/js/richdocuments-viewer.js?v=9407c8a6-0:2 handlePostMessage http://cloudie/extra-apps/richdocuments/js/richdocuments-viewer.js?v=9407c8a6-0:2 handlePostMessage http://cloudie/extra-apps/richdocuments/js/richdocuments-viewer.js?v=9407c8a6-0:2 e http://cloudie/extra-apps/richdocuments/js/richdocuments-viewer.js?v=9407c8a6-0:2 richdocuments-viewer.js:2:3879796

juliushaertl commented 11 months ago

Are you using a dedicated CODE server or the built-in CODE app?

malgam commented 11 months ago

I'm using the built-in CODE app.

LeHarry commented 8 months ago

Same problem. Debian 12 / Apache2 / built-in CODE app

Were you able to work this out?

dev-clavis commented 5 months ago

I noticied the same behaviour. with the docker version of nextcloud docker run -d -p 8080:80 nextcloud I used the preset config (sqlite db) made a folder Test and uploaded a .doc file with one space in the name

When trying to open this file and exporting it to a pdf, I first see the dialog for output file and afterwards the dialog for the pdf settings but after clicking on export nothing happens. No file gets created. Even when replacing the name in dialog to one without spaces.

When repeating the procedure a few times even the collabora services crashes or becomes unresponsive. I can open the file in the collabora web editor but the menus at the top vanish instantly After restarting the container everything works fine, except exporting the file, which works first after I renamed the file to another name ( _ instead of a space)

V

Host (Docker Host)

LostinSpacetime commented 1 week ago

I have the same Problem with NC 30.0.0, NCOffice 8.5.1 and the Built-in CODE Server 24.4.702 running on Ubuntu 22.04 with Plesk.