The web client breaks text files

Nextcloud version : 27.0.0
Operating system and version : Raspberry Pi reference 2023-05-03
Apache or nginx version : Apache/2.4.56 (Debian)
PHP version : PHP 8.2.7

Hello,

I currently use another product to synchronize my files and keep versions.
I’m now looking to test Nextcloud to see if it’s better.
But there must be something I don’t understand about how Nextcloud works…

I’ve installed Nextcloud on a rasberry pi (by installing php 8.2.7) and I’ve installed the client on a linux workstation without any problems.
Synchronization works.
As a first test, I created a text file in a directory on the client workstation, which is now synchronized. I entered the line “123”.
Synchronization takes place, and when I go to the Nextcloud web interface, I find my brand-new file. Clicking on it launches an editor and displays “123”.
I then add a line with “456”.
Synchronization takes place and on the client workstation I find the file with the new line “456”.
From this client workstation, I add a third line with “789”.
Synchronization takes place.
I return to the web client and it tells me:
“The document has been changed outside ot the editor. The changes cannot be applied”. And it displays the version with lines “123” and “456”.
If I click on the cross in the editor and look on the client workstation, I still get the line “789”, but if I click on one of the two buttons offered in the web client, it ignores the client workstation version and resumes the latest web client version.

It’s annoying not to be able to modify a file on both sides, but maybe I’ve missed something.
Is there anything I can do to be able to edit a file on both the web client and client workstation sides?

Thanks

I think you can open the text document in two different web interfaces at the same time. With just one desktop client and the document open in a different text editor, you can’t do this simultaneously. The desktop text editor can’t directly communicate with Nextcloud about the real time changes.

You can do changes in the web interface → close the editor wait to sync. Then someone does changes on the document via desktop client. Or even more users. And in the end you should see the result on the web-interface text editor.
To avoid parallel modifications, there is a file lock app: Temporary files lock - Apps - App Store - Nextcloud