Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-4190

OnlyOffice: document key generated from wrong lastModified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.3
    • Fix Version/s: 14.1
    • Component/s: None
    • Labels:
      None

      Description

      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;
       	}
       	
      

        Figma for Jira By 42nd

          Attachments

            Activity

              People

              Assignee:
              uhensler Urs Hensler
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Mandy Menzel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m