Bug 158260 - LibreOffice won't open WebDav document via the URL handler in macOS
Summary: LibreOffice won't open WebDav document via the URL handler in macOS
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-18 07:14 UTC by Malte Leverenz
Modified: 2023-11-19 20:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A sample HTML pointing to attachment 190897 (147 bytes, text/html)
2023-11-19 15:19 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Leverenz 2023-11-18 07:14:06 UTC
Description:
Try to open a document via the URL handler, for example: "vnd.libreoffice.command:ofe|u|https://.../name.docx".

LibreOffice opens, but only the start view, not the document.

This affects all browser I've tried: Safari, Chrome and Firefox.

I'm able to open the document without problems, when I use LibreOffice's own dialog and enter only the URL like "https://.../name.docx".
Unfortunately that's not sufficient in my use-case, as the WebApp I'm using only provides buttons to open/edit specific documents via long URLs. It's not a WebDav Folder that could be mounted.

It tried following LibreOffice versions, all with the same result: v5, v6, v7.

Steps to Reproduce:
1. Open browser in macOS
2. Navigate to a site which contains a link or a button with a javascript function that tries to open following scheme: "vnd.libreoffice.command:ofe|u|https://<path>.<office-file-suffix>" ("ofe" could also be replaced by "ofv" for read-only mode.)
3. Click on that link or button

Actual Results:
LibreOffice opens its start view

Expected Results:
LibreOffice should open the document in its editor


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.3.1 (X86_64) / LibreOffice Community
Build ID: c4af5b1259bceea6e979e6fe2435dbee7a5a87c2
CPU threads: 16; OS: Mac OS X 14.1.1; UI render: Skia/Metal; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 Mike Kaganski 2023-11-18 07:32:37 UTC
If you use a command line with such a URL:

  soffice vnd.libreoffice.command:ofe|u|https://.../name.docx

will it open the document?
Comment 2 Malte Leverenz 2023-11-19 15:07:56 UTC
I can confirm that I can open the document via:

/Application/LireOffice.App/Content/MacOS/soffice "vnd.libreoffice.command:ofe|u|https://..."
Comment 3 Mike Kaganski 2023-11-19 15:12:19 UTC
Christian: do you have an idea why the protocol handler in macOS doesn't pass the proper office URI to the soffice that is started correctly?
Comment 4 Mike Kaganski 2023-11-19 15:19:12 UTC
Created attachment 190912 [details]
A sample HTML pointing to attachment 190897 [details]

You may test the behavior using this sample reproducer.
Comment 5 Malte Leverenz 2023-11-19 19:03:52 UTC
Probably a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=151224
Comment 6 Mike Kaganski 2023-11-19 20:06:08 UTC
(In reply to Malte Leverenz from comment #5)

So is the issue caused by "Edit with LibreOffice" Nextcloud plugin from https://apps.nextcloud.com/apps/fileslibreofficeedit, as claimed there?

Also: does my attachment 190912 [details] also show the problem?
Comment 7 Malte Leverenz 2023-11-19 20:13:52 UTC
Your attachment is a perfect reproducible example of my reported bug.
Within a browser, just LibreOffice start view open
When I append the link to the soffice binary in my command line, it works as expected. So maybe there's something wrong with the registered URL scheme handler.

I don't use the nextcloud plugin, but my assumption is, that it simply provides a URL scheme link to the documents inside a webdav folder.
My guess is, that the plugin is not responsible.