Skip to content

File open always triggers save and overwrites last modified date #2337

@relikd

Description

@relikd

Describe the bug
I have multiple files which are saved as soon as they are opened. I am not sure why these files are updated. I tried to reproduce the bug with a new file but the new file was not affected. Maybe something with version history.

However, the network log shows a needless push "stepType":"replace","from":35,"to":35

Expected behavior
The file should not be written to disk if it has no changes. The unnecessary write destroys the "last changed" date.

Screenshots

Untitled.mp4

Client details:

  • OS: macOS
  • Browser: Firefox
Server details

Text app version: 3.4.0

Operating system: Arch

Web server: nginx

Database: mysql 8

PHP version: 8

Nextcloud version: 23.0.2 and 23.0.3

Logs

Nextcloud log (data/nextcloud.log)

N/A

Browser log

$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 9 main.js:1358:3634
Opening viewer for file  /Briefkasten/Protokoll-2022-01-13.md viewer-main.js:2:993487
oc_defaults is deprecated: use OC.theme instead, this will be removed in Nextcloud 20 main.js:1358:3634
Fetching additional files... viewer-main.js:2:994064
receivedSteps newVersion 1 editor.js:2:132079
receivedSteps newVersion 2 editor.js:2:132079
Saved document 
Object { id: <redacted>, currentVersion: 2, lastSavedVersion: 2, lastSavedVersionTime: 1650926125, baseVersionEtag: "<redacted>", initialVersion: 0 }
editor.js:2:124054
No new notification data received notifications-main.js:2:1120986
Polling interval updated to 30000 notifications-main.js:2:1121750
OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment main.js:116:2282
POST https://<server>/index.php/apps/text/session/push

{"documentId":<redacted>,"sessionId":<redacted>,"sessionToken":"<redacted>","steps":[{"stepType":"replace","from":35,"to":35,"slice":{"content":[{"type":"paragraph"}]}}],"version":0,"token":null,"filePath":"/Briefkasten/Protokoll-2022-01-13.md"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ☑️ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions