Hello ONLYOFFICE Community,
I am currently facing a persistent issue with my website’s integration with ONLYOFFICE Document Server, and I am hoping someone can help me understand what I may be missing. The core problem is that users can successfully open and edit documents through the embedded ONLYOFFICE editor, but after they finish editing and close the document, many of their changes are not saved back to my website. The editing experience itself is completely normal, with no visible errors while users are typing, formatting text, inserting tables, or making other modifications. However, once the editing session ends and the document is reopened later, the file stored on my website still contains the older version instead of the latest changes. This happens intermittently, making it difficult to identify a consistent pattern or reproduce the issue on demand.
The problem appears to occur specifically during the save process between ONLYOFFICE Document Server and my website. From what I understand, the editor should notify my application through the callback URL whenever a document is ready to be saved. My application is configured to receive these callback requests and replace the existing document with the updated version provided by ONLYOFFICE. However, although the editing session completes normally, the callback either does not seem to arrive in every case or the latest document is not always written correctly to storage. There are no obvious errors displayed to the user, so they naturally assume that all changes have been saved successfully. It is only when the document is opened again that they discover some or all of their edits are missing.
To troubleshoot the issue, I have verified that the callback URL is publicly accessible and that my application responds successfully when tested manually. I have also reviewed the integration settings to ensure that the document key, file URL, callback URL, and configuration parameters are being generated correctly for each editing session. The document opens without any issues, user permissions are applied correctly, and collaborative editing functions appear to work normally while multiple users are editing at the same time. Because the editor itself functions exactly as expected, I suspect the problem is occurring during the communication between Document Server and my application after the editing session has finished rather than during the editing process itself.
Another aspect that makes this issue particularly confusing is that it does not affect every document or every editing session. Some documents are saved correctly with every change preserved, while others lose the latest modifications even though the editing workflow was identical. I have compared documents of different sizes and formats, including DOCX files with simple text and larger documents containing tables, images, and formatting, but I have not identified a clear relationship between document complexity and the save failure. Since the behaviour is intermittent, I am unsure whether it is related to callback timing, session completion, document status handling, or some other part of the integration that only becomes apparent under specific conditions.
I have also enabled detailed logging within my application to monitor incoming requests from ONLYOFFICE Document Server. In some successful cases I can clearly see the callback request arriving with the expected document status and download URL, after which my application retrieves and stores the updated file correctly. However, in the failed cases there are either no corresponding callback entries or the callback sequence appears incomplete despite the user having closed the document normally. Because there are no visible errors in the browser and the editing session itself appears successful, I have been struggling to determine whether the issue is caused by my callback implementation, the Document Server configuration, network timing, or an incorrect interpretation of the document status values.
I would greatly appreciate guidance from the ONLYOFFICE community on how to properly diagnose and resolve this issue. Specifically, I would like to understand the recommended way to verify that callback requests are always being delivered, how to confirm that the correct document status values are being handled before replacing the stored file, and whether there are common implementation mistakes that can cause document changes to be lost even when the editor closes without errors. Any recommendations regarding callback processing, logging, session handling, or best practices for integrating ONLYOFFICE Document Server with an external website would be extremely valuable. My goal is to ensure that every document edited through ONLYOFFICE is saved reliably back to my website without users ever losing their latest changes. Very sorry for long post!