Notes data disappearing/overwriting

2
  • OK, so just to reiterate, our best chance of debugging this would be to figure out reliable steps to trigger the first occurrence of it after a Firefox/Zotero restart. Once it occurs once, it will keep happening, so subsequent occurrences aren't useful for debugging.
  • Since there was another report of this, I wanted to ask you two to confirm that the notes are actually getting overwritten, such that they're incorrect after you restart Zotero/Firefox, or whether this is just an issue with note refreshing when you switch between notes.
  • Yes, they are incorrect after restart/being overwritten.
  • edited May 15, 2013
    Hi,

    I 've updated my Zotero Standalone yesterday in my Windows PC to the 4.0.8 version.

    My problem is the same.

    Some notes are overwritten. I need help please.
  • More info about the problem.

    I have 2 items: 78I5F25V and AZ2ZQEBJ. Both had one different note with the linked item ID 628 and 1334.

    The 1334 seems to be overwritten the 628 ítem.

    With the debug mode, I 've trace the following (ID D1201795367):


    version => 4.0.8, platform => Win32, oscpu => Windows NT 6.0, locale => en-US, appName => Zotero, appVersion => 4.0.8

    =========================================================

    (3)(+0000000): Viewing item in pane 1

    (3)(+0000001): Refreshing hash map

    (5)(+0000463): SELECT ROWID FROM items WHERE libraryID IS NULL AND key=?

    (5)(+0000000): Binding parameter 1 of type string: "78I5F25V"

    (5)(+0000001): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

    (5)(+0000000): Binding parameter 1 of type int: 628

    (5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

    (5)(+0000000): Binding parameter 1 of type int: 628

    (5)(+0000001): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

    (5)(+0000000): Binding parameter 1 of type int: 628

    (3)(+0000000): Refreshing note editor

    (3)(+0000004): Textbox value hasn't changed

    (3)(+0107119): Refreshing hash map

    (3)(+0001268): Note has not changed in Zotero.Item.setNote()

    (4)(+0000000): Item 628 has not changed

    (5)(+0000001): SELECT ROWID FROM items WHERE libraryID IS NULL AND key=?

    (5)(+0000001): Binding parameter 1 of type string: "AZ2ZQEBJ"

    (3)(+0000000): Reloading tags

    (5)(+0000001): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

    (5)(+0000000): Binding parameter 1 of type int: 1334

    (5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

    (5)(+0000000): Binding parameter 1 of type int: 1334

    (5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

    (5)(+0000000): Binding parameter 1 of type int: 1334

    (3)(+0000001): Refreshing note editor

    (3)(+0000002): Textbox value hasn't changed

    (5)(+0000011): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

    (5)(+0000000): Binding parameter 1 of type int: 1334
  • More info.

    I 've compared both databases (the current and the auto backup created before upgrade the version) and the data has been modified.

    My conclusion is that the new version is overwritten the notes when you move from one note to another one.

    What should I have to do?
  • Hi again,

    Finally i think I have discovered what the problem is.

    The issue is only present with notes which contains images.

    I restored my notes from a backup and i was able to reproduce the bug.

    I have sent the debug with ID "D2023691989", where the most important thing is:

    5)(+0000000): SELECT note FROM itemNotes WHERE itemID=?

    (5)(+0000000): Binding parameter 1 of type int: 1012

    (3)(+0000005): No editor yet

    (3)(+0000001): Loading jar:file:///C:/Program%20Files/Zotero%20Standalone/chrome/zotero.jar!/content/zotero/tinymce/note.html?dir=ltr

    (5)(+0000008): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

    (5)(+0000000): Binding parameter 1 of type int: 1012

    (3)(+0000170): editor not ready


    It happens when i try to open the note. After that the note is blank lossing al the text.
  • OK, mcmcentire claimed not to have any notes with images above, but that was my original suspicion—thanks for helping to debug this. In what way are the images embedded?
  • Hi Dan,

    I think there is more than one problem with this.

    My images are embedded with a single compy and paste way (binary).

    --img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcIAAAD7CAIAAAB2eA
    PDAAAgAElEQVR4nO2dZ1xU19q3lwXBgqJBMbHnqIkmxkKMJSTRWGOLKMYuKkFF0XhUMGL
    HgtiiRI0lxt5RAQsehdhARDn0Ig+dl/4w5R.............loAAAAASUVORK5CYII="
    alt="" width="342" height="191" />


    After the note A get blank, if you try to open another note B without images all is ok, but if you go back to the note A, the content is copied from note b to note A.

    One more think, i tried to open the "file:///C:/Program Files/Zotero Standalone/chrome/zotero.jar" and a error window with this message was raised "Invalid or corrupt jarfile"

    I don't know if there are some relation.
  • edited May 15, 2013
    OK, thanks. I'll try to reproduce this. But, basically, embedding images in notes isn't supported. It certainly shouldn't result in data loss, but it's not something we recommend doing (and we should probably try to prevent it in the code as long as that's the case).
  • Yesterday i was working with the 3.x version installed on august 2012 and i don't have the problem.

    My problem started today with the version 4.0.8

    Is it necessary to upgrade the browser extensions?
  • One more question.

    Can I downgrade my zotero version from 4.x to 3.x?

    or

    Can I export my library from 4.x, uninstall the 4.x, install the 3.x and import my library?

    thanks a lot

    regards,

    Edgar
  • you can just downgrade, databases between 3 and 4 are compatible.
    Obviously other stuff may be broken.
    You can download old versions of Zotero following the same URL patter as the current version. E.g. the standalone 3.0.14 version for Windows is
    http://download.zotero.org/standalone/3.0.14/Zotero-3.0.14_setup.exe
    etc.
  • Edgar: Could you tell me the exact steps you're taking to reproduce the problem?

    The debug output you include above doesn't actually indicate a problem. I think you'll find you get the same output for the first note you load in your Zotero session, whether or not it has images.

    I'll try on Windows, but I can't reproduce any problems with a copy-and-pasted image in a note on OS X.
  • Background

    Version 3.x of Zotero.
    1. Add a new note “A”.
    2. Copy an image from paint (ctrl + c) and paste (ctrl + v) in
    note “A”.
    3. Open an existing note “B”
    4. Back to the note “A”
    5. The embedded image is OK

    At this scenario all is fine.

    Problems

    1. Problem 1: “The content of one note which has an embedded
    image is lost”
    2. Problem 2: “The content from a note without embedded image is
    copied to the note referenced in the problem 1”

    Steps for Problem 1:
    1. Install the 4.0.8 version of Zotero (All the library is
    loaded correctly).
    2. Open the note “B” (the content is loaded fine).
    3. Open the note “A” (the embedded image is lost) and the
    content gets blank. What happened? After a small delay Zotero
    loads a blank note.

    Note: I refer to existing notes from the old version, not about
    new notes created in the new version

    Steps for Problem 2:
    1. After the problem 1, open the note B
    2. Open again the note A. The content from note B will be copied
    to the note A
  • Wow, this is a nasty critter. (My problem sounds the same, so I posted here. Feel free to move it, or ask me to start a new thread if need be.)

    I also saw this thread; https://forums.zotero.org/discussion/28844/notes-data-disappearingoverwriting


    I'll try and recreate what happened, but it happened so fast.

    I've been working with Z (current v. 4.0.8) for hours a day for the last couple of weeks with no problems.

    Suddenly:

    I clicked on a blank note...nothing there. (No surprise). There were two attached to this item, so I deleted them.

    Then I clicked on another note (same item) and it did _not_ open. I suspect I clicked around (more notes on that item...didn't open. I think i click on a note in another item, and suddenly the notes started being overwritten. I think by the note from another item.

    (Meanwhile at some point I had restored the 2 empty notes from the trash).

    At times it seemed like it happened one note at a time, then all of a sudden _all_ the notes in the original item were overwritten...en masse.

    About this time I panicked and closed out Z (FF version) without running an error report. I opened up ZSA to see what it looked like there. It showed up as overwritten. The Web version was also overwritten (Dang sync feature :)...I proceeded to turn it off).

    I don't remember if I messed around with ZSA or not to see if there was a problem. But I did submit an Error Report ID: 1991793694. I'm not sure if that will show anything or not.

    I left that machine (lap top) and went into the PC, which I don't really use for Z, but I have it synced, but rarely opened and not auto synced.

    Anyhow, the Item in question was as it should be (hadn't synced)...
    but when I click on a note, it would not open!

    I clicked on a note from the following item...no problem. I then click back on a note in the problematic item, and bam...overwriting started. Here is the Report ID before closing and restarting. Report ID: 229306897.

    Now I'm posting here, and a tad apprehensive about returning to work!

    I'm sure the the above read is a bit confusing. Feel free to ask for more info.
  • arggem, do you recall pasting images into any of your notes? I believe this is being triggered by embedded images in notes, but I'm afraid I still can't reproduce it myself on OS X or on Windows.

    For what it's worth, this error has shown up in a number of error reports in this thread:
    string(203) "[JavaScript Error: "TypeError: base is undefined" {file: "jar:file:///C:/Program%20Files%20(x86)/Zotero%20Standalone/chrome/zotero.jar!/content/zotero/tinymce/tiny_mce.js" line: 712}]"
  • edited May 20, 2013
    OK, by opening notes with embedded images in Zotero Standalone (though not Zotero for Firefox), I can reproduce the error above, which also causes such notes to be blanked out. I can't trigger overwriting, but I imagine it's a related issue.

    I'll see what I can do. Just to reiterate, embedded images were never really meant to work (though I recognize that they look like they should and sometimes do) and are pretty problematic on a technical level, so I can't guarantee that we're going to be able to preserve those, but we should at least be able to fix the note-blanking issue (and hopefully the overwriting as well).
  • These notes are 4 and 5 years old, so I don't "remember" anything!

    But currently there are no embedded images in the notes for either item (the one that got overwritten, nor the one that was the "overwriter"). Is it possible that I experimented back then with trying to embed an image? Well, sure, anything is possible, but given these 2 particular items, I can't imagine doing so.

    I _do_ , however, have other items in my library (not related to this issue) where I have attempted to embed images. Would that be enough to trigger the problem?
  • Out of curiosity, would email addresses cut and pasted from websites or email messages 'act' like an embedded image? And so is possibly something we should avoid doing in future?
  • I haven't tested, but it's possible that a mailto: link could do this, yes. Technically, it's the use of the data: URI for embedded images that's triggering this, not the embedded image itself (though that can cause other problems, with syncing).

    If mailto: triggers this as well, it'll be the same fix on our end, not something you should need to avoid.
  • I first communicated my problem in a different thread, but this is definitely the right thread. This is exactly what is happening to me. I'll clarify my situation: 1) I've not embedded any images in my notes whatsoever; 2) most of my notes were created in word files which I have cut and pasted into notes (which is good, cause I can still reproduce the notes, many of which are quite long, from those saved files); 3) the problem occurs when I am working in a file with multiple notes and I click on one note, then click in the text field of that note, then click on another note - and that new note is instantly populated with the text from the first note; and if I click on a third note, it too is populated with text from the first note I clicked. I didn't know to run an error report on the first occurrence of the phenomenon, but when it happens again I will.
  • So I just had the same problem occur and did an error report immediately. The report number is 1973372822. I opened my database, clicked on a note field and the notes data disappeared; I then clicked on another and it overwrote data in that note with data from the neighboring note. Again, I have no graphics files embedded in my database. Please Help!
  • Help!!! It just happened again. I use my Zotero site to store primary source references under "titles" as "note" files. I can then search my categories or just words to pull up references.

    This had always worked really well, but since 4.0.8, it is overwriting one note with another, particularly if I copy data from one note, paste into a file, and then click on another note: the copied file pastes automatically into the new note file. The problem also seems to be worse if I am using a search of tabs and then cutting and pasting from notes which have been sorted by tab.

    I just ran another error report = 1387916430. Any help would be greatly appreciated.
  • It happened yet again. This was not searching by Tag but was reading one source, then attempting to move to a related source by clicking on "Related". I had cut and pasted from the first source, and the moment I clicked on the related source, it populated the note field with the note from the first reference I had been reading. Here is the reference ID: 1970818577.
  • And again. Error reference ID: 2068197756. I feel like I'm dangling out here a bit with no support.
  • OK, I believe this is fixed in the latest 4.0 Branch dev XPI. If you're experiencing this, you can try that build and see if you still run into trouble.

    (I think the difference I was seeing in being able to reproduce this was between a dev installation and a release build, not between Standalone and Firefox, though I still can't reproduce overwriting with a release build.)
  • edited June 28, 2013
    Edit: nvm, ignore this.

    Dan, noellenski,

    What OS is this? Is this Zotero for Firefox or Zotero Standalone? Is sync enabled?

    @noellenski, can you disable any other extensions in Firefox or Standalone and see if this re-occurs? Do the notes you are copy-pasting contain any sort of special formatting or URLs or images (anything peculiar other than plain text)?

    I don't think Error reports will be very helpful here (though Dan would be able to say more precisely), because there is no error happening here per-se. It seems that this is happening quite reproducibly on your system, so if you provide more details about your setup, perhaps one of us will be able to reproduce this on our end.
  • This is Zotero for Firefox. Sync is enabled.

    I can try disabling extneions in Firefox and see if it recurs.

    The notes do not contain any special formatting or URLs or images. Most of them have been copied from word files (which, btw, is my saving grace - I have word copies of all notes and thus can reconstruct).
  • noellenski: See my post above. As aurimas said, you can ignore his post.
This discussion has been closed.