All changes lost after viewing document history

I’ve installed a seafile server version 6.1.2 with mysql database and ssl following official documentation and integrated it with OnlyOffice as a subfolder. Everything seems to work fine until I try to view document history page, after that when I open the document again it gives me a message “The file version has been changed. The page will be reloaded” and when I click OK it shows me completely blank document (all changes lost) which I cannot even edit anymore. Why is this happening?

I don’t know why this happens but you should be able to roll back to the latest version via Seahub, if there was any.

I’ve just realized that history shown only last change, nothing more, so no rollback available. So it seems to be a history problem…

You mean in OnlyOffice or in Seahub “File history” ?

I mean seafile.

Does this occur only once or consistently?
My experience is that onlyoffice will only write the modification back to seafile server after you close the document window in the browser. So my guess is that your last modification didn’t write back to the server for some reason. The next time when you open the doc again, onlyoffice detects some inconsistency between its cached version and the seafile’s version and then force to reload the seafile’s one.

I edit a document, close it, open again as different user, all changes are there, edit again,close, open, edit and so on… all works great and all changes are saved until I go to see a history…

I repeat your steps on my server, and do not observe this strange result.
Actually, opening the same file multiple times in onlyoffice doesn’t mean the file has been written back to the seafile server. Could you download the doc file into you local machine, open it in doc, and verify if the modification is there?

You’re right, the downloaded file is blank, changes are not saved.

I think you have a problem with your ONLYOFFICE integration. Can you have a look at your logs on the seafile server?