nextcloud / richdocuments

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

Renamed document doesn't change name for other users #3471

Open eszkadev opened 9 months ago

eszkadev commented 9 months ago

Describe the bug When we share a file to other users and then inside Collabora Online we rename it using "file name input" on the top - file becomes renamed in the storage only for one user (I was renaming using file owner and only file owner saw the new name).

To Reproduce Steps to reproduce the behavior:

  1. Open Nextcloud, share some document with other user
  2. Open shared document with owner of a file and user who get the share
  3. Rename file using owner view (on the top bar in Collabora Online) Result: file gets renamed only in one session. Close file, refresh file list, notice that file is not renamed in the list for both of them. Open again in Collabora Online - you will get 2 different names for the same file.

Expected behavior File should be renamed in all the sessions and both users see the same name in Collabora Online and on the file list.

Screenshots rename3-2024-02-15_07.54.35.webm

Client details: Desktop

Server details

Nextcloud version: Nextcloud Hub 7 29.0.0 dev

Version of the richdocuments app 8.4.0-dev

Version of Collabora Online 23.05

juliusknorr commented 9 months ago

Currently our files app does not do any sort of live updates, we used to just reload the files list in the past when closing the document but moved away from that due to performance impact this has.

Is there a post message that all views would receive after the rename so that we could handle this within richdocuments? Otherwise I don't see a way forward except that at some point the files app of Nextcloud would listen to events for file changes (assuming https://github.com/nextcloud/notify_push is there in the setup)

eszkadev commented 9 months ago

@juliushaertl but it is not only in current session after rename. 2 different names are present on the File list in Nextcloud, even after reloading.

eszkadev commented 9 months ago

Is there a post message that all views would receive after the rename so that we could handle this within richdocuments?

I think that after rename we reload the document in COOL. New name should be applied if we receive correct name from WOPI storage. Now I see we get 2 different WOPI::CheckFileInfo, one with old name, one with new name for 2 sessions.

pedropintosilva commented 1 week ago

different names are present on the File list in Nextcloud, even after reloading.

cc @annanazarayan @jazevedo-coll : We (Anna, @artonge and I) just tested in 30.0.2 RC1 and Stable 29 and seems fixed

jazevedo-coll commented 1 week ago

Nextcloud Hub 9 (30.0.2 RC2)

@pedropintosilva tested this on RC2 and I was able to reproduce this bug.

Result:

owner of the document second user
Image Image