New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: onlyoffice Integration (cont...) #2954
base: master
Are you sure you want to change the base?
Conversation
5c6a769
to
d9d41ba
Compare
Rebased again to resolve new merge conflicts against latest master. @Equim-chan , @hacdias , @o1egl , any chance you could take a look? Appreciate the help ❤️ P.S. I'm hoping to send an additional pull-request after this one to allow creation of office documents from the new-file menu, but this pull-requests is already a bit large and I don't want to delay it any further, so choosing to wait until this one is merged. Here's a gif (need to press play), or full screen recording: |
Thank you @o1egl for proceeding the workflow. Updated the pull-request and fixed all the lint/build errors. |
Hi, it would be great if we could have this feature, filebrowser is so great, it would be even better! |
Hi, yes, I would love that feature, too. It looks like a lot of work has already gone into it, it would be a shame if it wasn't taken over. |
Is there any good news? |
306bbe4
to
7177665
Compare
Looks like the workflow proceeded again ~2 days ago. There were more linter errors here unfortunately 😅 I've rebased and addressed the lint errors and updated the branch/pull request again. Note: When I run If anyone is itching to try this in the meantime, I published a docker image at:
Though I recommend waiting until it's merged. |
Tested with a build on my side, it works. I'll use it and report any problems I find. |
It's determined by mimetype here.
Did you configure the only-office integration in
If those settings aren't configured, then the new-file dialogue will remain as-is. Note: I want to clarify that the changes to the new-file dialogue are not included as part of this pull request. This pull request is already large and I didn't want to delay it further with additional changes. I mostly wanted to keep it scoped to what had already been done in #1420 and unblocking those changes. However once this pull request is merged, I do plan to open an additional pull request for changes to the new-file dialogue so that those can be reviewed separately. The code for the new-file dialogue is in the new-file branch here, but again, is not part of this pull request. I did include it in the docker image though, so you should be able to try it and see it hopefully. |
I think I found a bug: Sometimes, when changing the file in the filesystem (in my case, changing the onlyoffice file in onlyoffice offline and editing via sftp or webdav), the online view stays stuck with some outdated phantom file; I guess some filename-handle is stuck and it's editing some older version still stuck in the onlyoffice backend? To replicate: Create file, change in file system and view in filebrowser multiple times, after 2 times (for me), it gets stuck with old contents. |
once a document is opened, the OnlyOffice Document Server keeps a cached version and serves the document from cache until all editing sessions for that document are closed. If the document changes in the file-system from some other process, then the existing onlyoffice editing sessions will not pick up of those changes since they're all being served from the document-server cache (until all editing sessions for that document are closed). Some details are documented here (can search for "cache" keyword)
@M3gaFr3ak these steps make me think I might have misunderstood the issue. Could you maybe post a video? |
I tested it again and recorded it. I'm using a webdav share to write to the directory here and I'm using ctrl-s to save and F5 to refresh. test.webm |
@M3gaFr3ak , Thanks for the video, that clarifies it. There's a period of around seven seconds between:
Does the problem persist if you wait a little longer between those two events? This may be due to the save delay described here. Essentially, when all editors close, the only office document server waits some time before triggering the callback handler to inform filebrowser to perform a final save for the file and clear the cached document key. If the file is re-opened before filebrowser receives this callback from onlyoffice, then the same document key is re-used and the document is reloaded from the same cache. From the documentation:
You could maybe try lowering that delay to something shorter in the onlyoffice document server settings (same documentation), but the race condition will probably still be present. I'm not sure if anything can be done to address it while still allowing co-editing. Curious to know if the OwnCloud/OnlyOffice integration also has this problem, but I don't have an owncloud instance to test it. |
I just opened the filebrowser OO with the modified files (modified 2hrs ago) and it still doesn't show the changes. I then restarted the OO docker container to maybe flush anything remaining and then opened the file in filebrowser OO again. Still no changes! Then I renamed the file and opened it, showing the changes finally. I'll try around with waiting for long times between showing online and editing offline. |
Addendum: Renaming the file to an older name, opening it in filebrowser OO yields the "old content" (the stuff it showed when it had the old name the last time). Addendum number 2: Restarting the only office container also doesnt solve the problem. Opening the file in filebrowser OO after an onlyoffice container restart still yields the old file contents. Only after deleting the container and re-creating it (meaning it purges the data), opening the file yields the new contents. (alternative is changing data from inside filebrowser OO, obviously). |
@M3gaFr3ak , Thank you for the additional details. I suspect I'll need to update the callback handler here to also handle status code 4 and clear the cached document key. I'm not able to try it today, but I'll take a look tomorrow. |
8c39ac7
to
c2e2c20
Compare
@M3gaFr3ak, I think this might have been it. (fixed here) I updated the pull request and docker image. Could you test again with the new image and let me know if you still see the same caching issues? Still |
new file and new folder with Chinese character gets 404 not found error |
I can confirm that fixed it, thank you :) |
@arcastro, thanks for adding this feature. I pulled your docker image and find it very useful. I've run into a problem when creating new files in a directory containing spaces in the path. If I try to create a new file (only office or 'empty') in a directory that contains any spaces, I get a '404 not found', and the file is created in a new directory where all the spaces are replaced with % signs. |
Any updates? |
Please note that the filebrowser has been updated to use Vue 3, which has caused some merge conflicts. Kindly resolve these conflicts as required. |
Ty @o1egl , I'll send a new revision soon. |
…dressed other comments
Co-authored-by: Radosław Gryta <radek.gryta@gmail.com>
@o1egl , I've rebased and updated the pull request. |
Description
This is a continuation of the pull request here:
In this pull request, I have:
Links