Legacy Knowledge Base
Published Jul. 2, 2025

Liferay Sync is overwriting file versions of LibreOffice documents in Documents and Media

Written By

Brian Suh

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • Liferay Sync is overwriting file versions of LibreOffice documents in Documents and Media
  • For example, if we have Liferay Sync configured to detect changes within a directory where a LibreOffice document is actively being worked on, the updated LibreOffice document will be uploaded as a new version (v. 1.0), rather than an incremented update (v. 1.1) of an existing version.

Environment

  • Liferay Sync client
  • LibreOffice

Resolution

  • This behavior is identified to be a limitation within Liferay Sync
    • 1. When the file is saved in LibreOffice it is renamed to a temporary file name (e.g., 1.1-Document.docx~RFbca4687.TMP). The Sync client identifies this change and makes the same rename in Liferay's Documents and Media.
    • 2. This temporary file is then deleted from the file system by LibreOffice, and the Sync client also performs this action in Liferay. At this point, this is why the file may go missing from Documents and Media.
    • 3. Upon saving the file again in LibreOffice, the original filename is back again which the Sync client sees and then uploads, thinking it is a new file.
  • Due to the naming convention used by LibreOffice (e.g., 1.1-Document.docx~RFbca4687.TMP) Liferay Sync currently does not have a way that can filter out these entries, as they appear to be valid files.
  • As new versions of the Sync client will no longer be released (as it is under Maintenance Mode), this is considered a known limitation of Liferay Sync.
  • The recommendation is to:
    • (a) use LibreOffice outside of the configured Liferay Sync directory, and copy over the file once the changes are finalized,
    • or (b) Microsoft Office has been confirmed to work as expected in our testing, so it can be used as an alternative to using LibreOffice, due to its unique handling of temporary files.

 

Did this article resolve your issue ?

Legacy Knowledge Base