orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
585 stars 37 forks source link

"This note does not exist any more.", but note hasn't changed #266

Open pjhfggij opened 3 months ago

pjhfggij commented 3 months ago
Device: Pixel 6a
Android Version: 14
Orgzly Revived Version: 1.8.19
Repository type(s) used: fdroid

I'm keep getting "This note does not exist any more." error after a notebook is edited remotely on another computer. This appears after trying to click on a notification pushed by orgzly (before the notebook was edited remotely). It happens irrespective of the change - even if done to another header in the notebook (e.g. prepending DONE to a header).

To reproduce:

  1. share notebook remotely via nextcloud, rclone or a similar solution.
  2. schedule a notification.
  3. wait for notification to be pushed
  4. edit the notebook remotely
  5. synchronize
  6. click on the notification from orgzly
  7. the error appears

Expected behavior: I expected orgzly to only push this error when a that corresponding entry was edited. Or even better for it to just pull the changes and display the current version.

Possible solution: store checksums of each item and when this error is detected attempt to find corresponding header using checksum (or combination of other heuristics).

[X] I have searched for existing issues that may be the same as or related to mine.

licaon-kter commented 3 months ago

No need for remote changes either, just edit locally, eg. Change sched time

Then open the notification...

amberin commented 3 months ago

I'm just going by memory now, but I'm fairly sure this happens because each edit or update of a note means that it gets replaced in the database, and thus gets a new ID. So Orgzly has no way of finding the note referenced by the notification. I suppose something like #268 could help, but personally I find such generic IDs to be annoying clutter.

It would be good to examine, and document in some issue, the feasibility of updating notes in-place, instead of replacing them. I'm guessing it would be harder for remote changes, but easier for local edits. (IIRC, remote changes in a notebook always means that all its notes are deleted from the database, and then new notes are created when loading the book.)