Yet another linking issue

Hi team,
Longtime user of Zotero here. Thank you for such a great program!

I just updated my OS to Windows 10 (from 7) on a fresh SDD. I sync Zotero database via the Zotero service, and use relative links to a shared Syncthing folder to maintain files across computers. I re-synced my storage folders after reinstalling the OS, and reinstalled Zotero. Pointed the 'Linked Attachment Base Directory' to the sync folder as usual, and then re-synched from the Zotero cloud. This should AFAIK have worked!

However, clicking on attachments Zotero is still searching the default C:/Users/NAME/Zotero/storage directory. In addition, all the attachments have switched from 'links' (with chain) to normal storage.

Q: how to fix? What would have caused this behaviour in the first place?

NB: in the console, 'extensions.zotero.baseAttachmentPath' does indeed point to the correct place, but Zotero is still searching the default storage directory.



  • Nothing would cause that. The files were just stored files, not linked files, and you had file sync disabled. So the files were stored in the Zotero data directory on that computer all along without being uploaded, and you just didn't notice because they still worked.

    Assuming you have a backup of your Windows 7 disk, you would just need to copy the contents of the 'storage' folder to the 'storage' folder in your current data directory.
  • Thanks for responding @dstillman!

    Not how I thought it could work, since it still functioned well across multiple machines and synced well, despite the Zotero data directory not being synched.

    Is there any way to shift the stored files to linked files? The directory structure should be the exact same.
  • it still functioned well across multiple machines and synced well, despite the Zotero data directory not being synched
    Not sure what you mean by that. You've been using Zotero syncing, so your data has been synced. It looks like you were syncing files a few years, though not since then. No other stored files would be accessible on other computers unless you somehow synced the 'storage' directory separately. (Are you sure you weren't syncing just that folder with Syncthing?)

    ZotFile can convert stored files to linked files.
  • To clarify: I've been using Zotero to sync databases, syncthing to sync attachments. Everything was working fine and was up-to-date across multiple machines a couple days ago, then stopped working because Zotero is now looking to the Zotero data folder (storage) for files instead of the sync folder. I've sleuthed that its doing this now because files are 'stored' instead of 'linked' - despite being linked a couple days ago.

    I'll look into Zotfile converting my entire library back to linked files and will post here if this fixes the problem. I still don't understand how the problem happened in the first place though!
  • And I'm explaining that you're mistaken here. You've been adding stored files to your Zotero library for many years. You have thousands of stored files and <200 linked files. These attachment items haven't changed since they were created, over the last many years. They were always stored. They were never linked. Zotero is not looking somewhere different for them. They're just stored files, and they always have been.

    Again, you were either just opening these files on the computer where they were created or you were syncing the 'storage' folder within the data directory separately from Zotero file syncing.
  • I understand that's what you think, but I am afraid you are incorrect here. The storage folder inside the Zotero data folder was never synced across devices. I know that Zotero previously was linked because the icons had chains, and annotations synched perfectly between devices to the shared folder within seconds through syncthing (which was NOT under zotero/storage, and never was). Now they are no longer linked as they were previously, which is what I'm trying to figure out.

    The distinguishing between 'stored' and 'linked' attachments seems to be the problem.
  • It's not about what I "think". This isn't a matter of opinion. You use Zotero syncing, and your data is stored in a database on our servers. The server disallows changes between stored files and linked files, and even if it didn't, every item has an internal timestamp that is updated whenever anything about the item changes. You have 4279 stored-file attachments, dating back to 2014, that haven't changed since they were first created. You have 150 linked-file attachments. Even if you somehow had linked files locally that didn't properly sync, or previously had hundreds of linked files that you since deleted, there is no way that another device that was syncing with this account ever didn't receive data for 4000+ stored files.

    I can't explain what exactly you're misremembering — maybe you had multiple accounts and are thinking of a different one, maybe you're forgetting how you had Syncthing set up, maybe you only ever opened files on one computer — but you're confused about this. You have always had these 4000+ stored-file items in your database.

    If you're going to post here, you're going to have to accept that we know what we're talking about.
  • Apologies for the offense - I never meant to imply that you don't understand what you are talking about, and I deeply appreciate your time. Thank you.

    Perhaps I have misunderstood the issue then and it has nothing to do with linked or stored files. Thank you for looking into this.

    What I am trying to explain is that the files were never stored on 'zotero/storage' on this system. I have double checked my backup of the formatted drive and can confirm this. In the past, I simply pointed my 'Linked Attachment Base Directory' to the sync folder, and things worked fine. I expected this behaviour to continue on the new install and it hasn't. So..... any ideas?
  • edited April 23, 2021
    This doesn't have anything to do with the Linked Attachment Base Directory setting. You have mostly stored files. That setting is completely irrelevant for all but 150 of your files.

    The files were absolutely stored within 'storage' on the computer where they were created. If you think they weren't, you are misremembering. Stored files are created within 'storage' on the computer where they are added — always, no exceptions. The only way they would be available anywhere else would be if you used Zotero file syncing (either Zotero Storage or WebDAV, and only the former if you since purged your files via your storage settings on the website) or if you were syncing the 'storage' folder yourself outside of Zotero. There is no other way this works. I would guess that you simply had been opening the files on the computer where they were originally added and didn't realize they weren't available elsewhere.

    If you deleted the 'storage' folder on the computer where they files were added and you never synced them anywhere else, you would need to restore them from a backup from that computer.

    If you share a zip of the zotero.sqlite file (or a link to it) from that backup with us at support@zotero.org with a link to this thread, we can look at it and try to shed some light on what you're seeing. But the Linked Attachment Base Directory setting is not relevant for the vast majority of your files.
Sign In or Register to comment.