nextcloud / notes

✎ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
622 stars 133 forks source link

Rich Text Editor: Reproducible "The document has been changed outside of the editor. The changes cannot be applied." #1083

Open bentolor opened 1 year ago

bentolor commented 1 year ago

The Rich Text Editor continues to get in my way and provoking data loss due to lost changes. The main reason is that the editor shows the The document has been changed outside of the editor. The changes cannot be applied.-dialogue and leaves the user to picked the right button.

There are several constellations this error occurs consistently in any of the following cases:

Steps to reproduce

  1. Edit & create a note. Ensure it is saved by clicking the checkmark with the red dot in the UI.
  2. In Settings: Change Display mode to Open in edit mode
  3. Edit something. Save it with [Ctrl-S]
  4. In Settings: Change Display mode back to Open in rich text mode
  5. Conflict dialogue appears

On similar lines one can provoke/reproduce the same error for any of the other use-cases.

Expected behaviour

The rich-text editor should not keep any (outdated) cached version directly after save and claim potential data-loss or differences to the stored version.

Instead it should start fresh from the saved version in any case you left it saved.

Actual behaviour

Honestly: I don't understand the whole need for background caching across editor sessions.

Server

Please complete the following information.

Nextcloud configuration:

``` { "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "27.0.1.2", "overwrite.cli.url": "http:\/\/localhost", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_sendmailmode": "smtp", "mail_smtpauth": 1, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpsecure": "tls", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "theme": "", "loglevel": 1, "overwriteprotocol": "https", "default_phone_region": "DE", "app_install_overwrite": [ "tasks", "issuetemplate", "drawio", "breezedark" ], } } ```

Client

Please complete the following information.

uli-f commented 1 year ago

I use the android app to edit my notes and this happens every time I make a change to a note in the app and then open up the same note in the web UI. I would appreciate it if this could be fixed.

thstyl2000 commented 11 months ago

Same thing here. No need to say that this kills collaboration, since it also happens when one user edits a shared note and another then also.

bentolor commented 10 months ago

@juliushaertl Issue is tagged with need to reproduce, though reproducer is in the ticket. Anything I can help to support this issue? I'd really love to be able to use Nextcloud Notes more comfortable in my daily use.

coltenkrauter commented 9 months ago

Any updates on this?

mapausch commented 8 months ago

same issue here. When I want to open a note in Nextcloud WebUI, but note was edited before e.g. on my Android device and synced back to NC, then I see this message: The document has been changed outside of the editor. The changes cannot be applied.

Additionally I have to choose between "Use current version" and "Use the saved version".

Finn10111 commented 8 months ago

same issue here. When I want to open a note in Nextcloud WebUI, but note was edited before e.g. on my Android device and synced back to NC, then I see this message: The document has been changed outside of the editor. The changes cannot be applied.

Additionally I have to choose between "Use current version" and "Use the saved version".

Same issue here. Can I do anything which would help to solve this issue? For me it happens in Rich Text Mode even if I do not actively use the Android Notes app.

greenais commented 8 months ago

Same here. Doesn't happen for me in plain "Open in edit mode", I use it as limiting workaround since rich text is obviously broken. No one in Nextcloud cares for almost a year?

maxkapur commented 8 months ago

Same issue here. I can reproduce it consistently by editing my root-directory readme.md in a desktop text editor (say, Kate) while having the Nextcloud web interface open to the root directory in my browser. (The web interface isn't editing readme.md or anything, just showing the usual preview of it.)

A big help, though short of a fix, would be to improve the wording of Use current version vs. Use the saved version. If you look closely at the documents, you can see that the "saved" version is actually more "current" (newer) than the "current" version. At the risk of verbosity, something like Use the version last used with Nextcloud Notes and Use the most recent version would reduce the risk of confusion.

bigretromike commented 4 months ago

29.0.3 without any office suite. Still there is issue.

When I create .txt file on synced dir, put 1 inside, open that in webui and close, then I put in 2 via local notepad, wait for sync in desktop app or force the update, and reopen file in webui i still have 1 for longer time until it show me which version I want to pick the one with 1 or 2.

Also, Is I reopen locally file with 2 and just hit save, now when opening it via webui it ask me if I want 2 version or 2 version (current vs saved).