Skip to content
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

Word sometimes shows stale data in edit mode and latest data in view mode #472

Open
shreyCreator opened this issue Aug 20, 2024 · 2 comments

Comments

@shreyCreator
Copy link

Hey,
I am getting a issue sometimes when edit mode of word(via WOPI) shows data of previous version but when i switch to view mode then it shows correct data. But it happens only 1-2 out of 10 times.
Steps when it happens sometimes

  • I uploaded a document having version 0.1.
  • I tried editing it online via WOPI and made it to 0.2.
  • Now my word is open and parallely i checked in a completely new document having different file name(version becomes 0.3) but fileId is same as of 0.1 and 0.2 version.
  • I again opened 0.3 version while 0.2 version is still open. I see that i am seeing 0.2 version content.
  • Now close both the windows of word and open it again. So you will sometimes see that document shows stale content and after 1 hour it starts showing new content.
@RobRol
Copy link
Contributor

RobRol commented Aug 20, 2024

Hi @shreyCreator,

I should start by saying that I'm not on the product team who owns this scenario. However, I'd like to better understand the third bullet. How do you do the following:

"checked in a completely new document having different file name
 (version becomes 0.3) but fileId is same as of 0.1 and 0.2 version"

I can imagine a world where a rename would change the filename, but keep the file's id. However a rename doesn't change the contents of the document. Checking in a new file, confuses me. What happened to version 0.2 of the file?

If you are overwriting the document, I'd like to better understand how you are doing so? The Wopi lock is intended to prevent any file changes to the document from clients who aren't WOPI aware. This is why the WOPI PutFile operation requires that the lock string match the active lock. It is intended to prevent these type of scenarios.

If you are trying to support coauthoring with, say, a desktop version of Microsoft Word when that is not supported by the standard CSPP program. Fortunately, the CSPP Plus program can support coauthoring between Office Web, Office Mobile, and Office Desktop.

@shreyCreator
Copy link
Author

shreyCreator commented Aug 22, 2024

Hey @RobRol ,
I got the issue. we were allowing the user to override the document(basically upload a new document) even though it's locked hence we got the above error. We have fixed the above issue by now allowing user to upload a new file when a active session is going on using locks

But there is one more case where we are facing the same issue. Let me quickly explain the scenerio -

  • Let's say the initially content of file is (version - 0.1)-> Hey, I am the file content of document 1
  • Now I edited the file in online editor(wopi) and make content -> Hey, I am the file content of document 1. I ${name__s} edited file in online editor. Now version of file becomes (0.2)
  • Now as per requirement what happens we first save the file in blob storage and then a background job runs and replaces the placeholder which is ${name__s} with my actual name without changing the version. Now sometimes what happens is that in edit mode i still see the content Hey, I am the file content of document 1. I ${name__s} edited file in online editor and not the content where i have replaces the ${name__s} with the actual name. But in view mode I get updated content. Now i understand that wopi probably caches data but is there a way to ovveride that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants