elias-sundqvist / obsidian-annotator

A plugin for reading and annotating PDFs and EPUBs in obsidian.
GNU Affero General Public License v3.0
1.46k stars 68 forks source link

Annotations disappear #306

Open aladmit opened 1 year ago

aladmit commented 1 year ago

This issue is suppose to be main issue on the problem of disappeared annotations. I'll use it to collect all info on this topic from all other issues to see a big picture of what's going on and to keep everyone up to date on fixes and workarounds.

aladmit commented 1 year ago

Annotation disappear when edit from different OS

How to fix

Manually find and replace urls/hrefs for preferred OS. Manually find and replace spaces in title.

Annotation json was corrupted

How to fix

Delete all annotations and create them again from annotator.

File renamed or moved

How to fix

Manually find and replace old href and uri with new path.

Newlines in comments

githublx893118804 commented 1 year ago

too least version to use annotator, version 1.2.7 is ok.

diplomatech commented 1 year ago

Annotations, highlights... everything disappears when making annotations inside an ePub book. However, when I opened the annotation note (that with annotation-target yaml) as markdown, the notes was there... But, when I switch to "Annotate" again, nothing is there...

hsequeda commented 1 year ago

Same, the annotations are there because when u change to Markdown mode u can see it, but doesn't appears in the annotation list.

Davidb-2107 commented 1 year ago

Same, the annotations are there because when u change to Markdown mode u can see it, but doesn't appears in the annotation list.

Same problem for me

JJDahlberg commented 10 months ago

I'm new to commenting on GitHub so apologies in advance for any awkwardness in this comment. This is my first GitHub comment ever.

I experienced one of the problems mentioned, Annotations behaving fine until running Linter and then Annotations misbehaving and not showing anything in Annotator view.

I saved my .md file before, then I ran Linter, and then I saved the .md file after. Then I ran a compare (using a standalone compare tool called BeyondCompare) of the .md files from before Linter ran (all annotations ok) and after Linter ran (all annotations not ok). I have attached a Snippet of the compare findings in the Annotate sections from BeyondCompare and it shows that my config of Linter added a space between > and %%, it added an additional line with a >, etc...

Compare of good md file and after Linter bad md file using Beyond Compare

I reviewed my configuration of Linter looking for settings that may have caused the changes to the .md files from running Linter. I trial and errored my way to get Lint settings changed so that breakage caused by Linter no longer occurred. I then double checked by starting with my original .md with working Annotations, running Linter (with adjusted configs), and then viewing the Linted .md with Annotation working. To hopefully simplify showing the Two Linter configuration changes that were causing my Annotations to break I have attached a Snippet of the Diff View (from Obsidian Git) for the data.json file (the one for Linter) which highlights that "blockquote-style" and "empty-line-around-code-fences" were the two Linter changes that I needed to make to fix my Annotate with Linter issues.

Diff View of Linter data json showing the two changes that make Annotate and Linter play nice for me

Hopefully this is helpful to both people experiencing this issue as well as the developers and contributors to Obsidian Annotator.

salvlox commented 1 month ago

Annotations, highlights... everything disappears when making annotations inside an ePub book. However, when I opened the annotation note (that with annotation-target yaml) as markdown, the notes was there... But, when I switch to "Annotate" again, nothing is there...

And also the pop up icon under an highlighted sector isn't there, and you can't add annotations