-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
Continuation of the story #2165. I noticed that this does not always work.
To Reproduce
Steps:
- Open the file via richdocuments.
- Fill out the form.
- After completing the form, make changes to the open file and save.
Result: The last submission will be overwritten by the version from richdocuments.
Expected behavior
It will not allow saving in richdocuments. It will ask to download the updated version first.
Additional context
The solution I found:
In richdocuments, listen to PostWriteListener and if it is CLI, invalidate (delete) all tokens for this file.
Result: All users of the file will receive a message that they need to reload the page. They reload and get the latest version.
Disadvantage: If users had unsaved changes, they will be lost. In my opinion, this is less critical because the user will see that their connection has been lost and will understand that they need to check if all changes are there (plus richdocuments has auto-save, so the impact is minimal). Because now, when richdocuments overwrites Submission, there is no way to track it, and it causes a lot of problems.