[5.0 Beta] Bug: notes are replaced by others notes
Zotero version: 5.0-beta.200+182cf67
Steps to reproduce:
1) Cclick on a tag in the left pan.
2) In the middle pan, open a "top-level" note (a note without a parent item). Let's call it "Note1". The note doesn't open on the right pan. (This is a bug)
3) Without changing anything, open a "children" note in the middle pan (a note with a parent item). Let's call it "Note2". The note opens in the right pan (as expected)
4) Without changing anything, try to reopen Note1. The note that appears in the right pan is still Note2. (This is a bug)
5) Without changing anything, open another "children" note (Note3). Note3 appears in the right pan (as expected) BUT Note1 is replaced by Note2 (the content of the note and the tags are replaced, but the key in the table " items" from the Sqlite remains the same). This is a huge bug: I lost many important notes before I realized what happened.
Steps to reproduce:
1) Cclick on a tag in the left pan.
2) In the middle pan, open a "top-level" note (a note without a parent item). Let's call it "Note1". The note doesn't open on the right pan. (This is a bug)
3) Without changing anything, open a "children" note in the middle pan (a note with a parent item). Let's call it "Note2". The note opens in the right pan (as expected)
4) Without changing anything, try to reopen Note1. The note that appears in the right pan is still Note2. (This is a bug)
5) Without changing anything, open another "children" note (Note3). Note3 appears in the right pan (as expected) BUT Note1 is replaced by Note2 (the content of the note and the tags are replaced, but the key in the table " items" from the Sqlite remains the same). This is a huge bug: I lost many important notes before I realized what happened.
I can't reproduce anything like this, though.
I couldn't reproduce the bug today, though it happened yesterday on two different computers (same zotero version) connected to the same zotero account.
If the bug comes back, I will try to gives you more details.
***BUG 1: When an item is permanently deleted, the entries in the table itemRelations pointing to that items are not removed. ***
Steps to reproduce:
1) Create 5 notes (NoteA, NoteB, NoteC, NoteZ and NoteY) with some content in it.
2) Relate NoteA, NoteB, NoteC
2) Move NoteA to trash and delete it permanently.
3) When NoteA is permanently deleted, the entries in the table itemRelations for
NoteB and NoteC that point to NoteA aren’t removed. So NoteB and NoteC are still related to NoteA but NoteA doesn’t exist anymore. NoteB ad NoteC are thus corrupted
4) Now click on NoteB, it won’t be displayed in the right pan. (Same thing with NoteC) This is where BUG2 starts.
***BUG 2: The corrupted items get replaced***
Steps to reproduce:
1) After doing the steps in BUG1, click on NoteB and it isn’t displayed on the right pan.
2) Click on note NoteZ, NoteZ is displayed without any problem.
3) Click on NoteB, the note displayed in the right pan is still NoteZ
4) Click on NoteY, the note displayed in the right pan is NoteY but NoteB has just been replaced by NoteZ.
That would be great if you could add a DB checker that would automatically remove all the entries in itemRelations that point to a non-existing items.
My zotero version didn’t change, it’s still 5.0-beta.200+182cf67
+++++
Another bug:
Also I notice that simply clicking on some notes (not all) modifies the "Date Modified" of the note : the date displayed for the note in the column "Date Modified" of the middle pan is set to the current date and time even though I didn’t change anything, I simply clicked on it. The content, tags and related items aren’t modified.
I'll fix this later today.