-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 14.0.3
-
Fix Version/s: 14.1
-
Component/s: None
-
Labels:None
-
Funded by:
There is a problem when reopening a created file with OnlyOffice. The error message from OnlyOffice is:
The cause is that the document key is generated from a wrong timestamp. It hat to be the lat modification timestamp from the file itself. This patch fixes that:
diff --git a/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/OnlyOfficeServiceImpl.java b/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/OnlyOfficeServiceImpl.java index 002cd7f..7539c24 100644 --- a/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/OnlyOfficeServiceImpl.java +++ b/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/OnlyOfficeServiceImpl.java @@ -206,7 +206,7 @@ } private String getDocumentKey(VFSMetadata metadata) { - String lastModified = LAST_MODIFIED.format(metadata.getLastModified()); + String lastModified = LAST_MODIFIED.format(metadata.getFileLastModified()); return metadata.getUuid() + "-" + lastModified; }