When a user copies the URL from the browser and gives it to another user who has a share on the document, the document may not be able to be opened.
This may be the case when the document is in a different directory at the receiving end than the sending end. Now the path is taken which is in the URL. By looking only at the fileid instead of the directory in the URL, the document can be opened.
See comment on this issue; https://github.com/owncloud/richdocuments/issues/533#issuecomment-2042867565
When a user copies the URL from the browser and gives it to another user who has a share on the document, the document may not be able to be opened.
This may be the case when the document is in a different directory at the receiving end than the sending end. Now the path is taken which is in the URL. By looking only at the fileid instead of the directory in the URL, the document can be opened.