Show a popup if DB corruption is detected with a warning to avoid
storing the data directory in cloud storage, a link to a support page
with more information, and a button to restore from the last automatic
backup.
Also show the warning about cloud storage again after restoring from the
last automatic backup.
- Include file path
- Show separate message for linked files mentioning Linked Attachment
Base Directory
- Link to separate support page for linked files
Say "Use the [local|remote] version for all remaining conflicts" for
everything instead of saying "Use [local|remote] fields for all
remaining conflicts" for some conflicts.
This also fixes a test failure after 54343c49fb.
This changes the way item types, item fields, creator types, and CSL
mappings are defined and handled, in preparation for updated types and
fields.
Instead of being predefined in SQL files or code, type/field info is
read from a bundled JSON file shared with other parts of the Zotero
ecosystem [1], referred to as the "global schema". Updates to the
bundled schema file are automatically applied to the database at first
run, allowing changes to be made consistently across apps.
When syncing, invalid JSON properties are now rejected instead of being
ignored and processed later, which will allow for schema changes to be
made without causing problems in existing clients. We considered many
alternative approaches, but this approach is by far the simplest,
safest, and most transparent to the user.
For now, there are no actual changes to types and fields, since we'll
first need to do a sync cut-off for earlier versions that don't reject
invalid properties.
For third-party code, the main change is that type and field IDs should
no longer be hard-coded, since they may not be consistent in new
installs. For example, code should use `Zotero.ItemTypes.getID('note')`
instead of hard-coding `1`.
[1] https://github.com/zotero/zotero-schema
In particular, remove code related to opening/closing the Zotero pane,
which affects tests. The pane is now opened by default in Firefox, which
brings its behavior closer to the main version.
The menu includes all user interface options from the General
preferences (now removed from the preferences), toggles for the
collections pane, item pane, and tag selector, and, at long last, a
toggle for recursive collections ("Display Items from Subcollections").
The collections pane and item pane no longer reopen automatically when
restarting Zotero. People might still close them by mistake and not find
this menu, but we'll see how it goes.
Closes#1372
Without an accompanying "Restore from Online Library" option, which
doesn't currently exist, "Restore to Online Library" can be interpreted
two ways. It's clear if you read the text below or the confirmation
prompt, but if you don't you might accidentally do something very bad.
This was almost certainly also translated in misleading ways in other
locales.
- Fix don't-show-again checkbox for non-DB items
- Tweak warning text
- Don't show comma after year if year is missing (which it shouldn't be)
- Remove redundant try/catch
- Check for retracted items using data from Retraction Watch
- Show an X next to retracted items in the items list, and show a
scary message at the top of the item pane with more info and links.
- Lookup is done in a privacy-preserving manner using k-anonymity --
the server is unable to determine the specific items that exist in
the client, so people who don't sync don't need to share any library
data (though the server doesn't log the lookups anyway).
TODO:
- Pop up an alert when new items are found
- Show a confirmation prompt when citing a retracted item
- Support items without DOIs or PMIDs
- Add a proper PMID field and expand DOI to more item types so these
values don't need to be parsed out of Extra
- Clear the banner immediately when all possible fields are cleared
instead of waiting a few seconds
This adds "English (UK)" to the locale list, which allows for "tag
colours" and allows dates to be recognized in d/m/y form.
I changed "color" and "license" on Transifex, but I'll leave other words
for others to change. If we stick to Oxford spelling, there probably
won't be too much else.
This should have been obvious, but we've been seeing Terminal when testing
because we're launching Zotero from the Terminal. Users with installed
Zotero version actually see 'Zotero' in instead of Terminal.
If there's no translated PDF or the translated PDF fails and the item
has a DOI, check Zotero's Unpaywall mirror for possible sources and try
to download one of those.
Unlike with "Add Item by Identifier" and "Find Available PDF" in the
item context menu, this does not try the DOI/URL page, since it would
result in more data leakage and most of the time you'd be saving from
the DOI page already. We could consider offering it as an option, but
for it to be useful, you'd have to have an institutional subscription,
be on-campus or connected via VPN (for now), and be saving from
somewhere other than the main page.
A new connector endpoint, sessionProgress, takes the place of
attachmentProgress. Unlike attachmentProgress, sessionProgress can show
new attachments that have been added to the save, and with a little more
work should also be able to show when a parent item has been recognized
for a directly saved PDF.
This also adds support for custom PDF resolvers, available to all PDF
retrieval methods. I'll document those separately.
Closes#1542
- Show a clearer message on a certificate error that includes the
underlying error, which should make debugging much simpler. (No more
checking in a browser and hoping it's the same connection.)
- Mention proxy server in message on startup proxy-check failure
- Include link to connection-error KB page on sync connection failure
Closes#1191Closes#1513
If a proxy is required and we can't connect to S3, show the (sync) error
icon. For SSL certificate errors, which are the most common cause of
this, the panel includes a link to the SSL cert troubleshooting page.
- Add the ability to extract a PDF URL from a given webpage using the
translation framework
- Add the ability to get open-access PDFs from landing pages from
Unpaywall data in addition to direct PDF URLs
- Use the above functionality to improve PDF retrieval for "Add Item by
Identifier"
- Add "Find Available PDFs" option to the item context menu to retrieve
PDFs for existing items from the DOI or URL page or using Unpaywall
data. The option appears for single items with a DOI or URL and no PDF,
and it always appears when selecting multiple top-level items (but
skips ineligible items).
PDF extraction from DOI/URL pages will currently only work with
unauthenticated access (i.e., on-campus or VPN, but not via a web-based
proxy).
Supersedes and closes#948
Use the new wizard for all imports (even if no Mendeley DB), and add a
page with a "Place imported collections and items into new collection"
option. If deselected, collections are added to the library root.
Accept Mendeley SQLite databases via File → Import… and perform a
direct import, including collections, timestamps, notes, attachments,
and extracted annotations.
When a Mendeley database is present, File → Import… shows a wizard that
lets you choose between a file and Mendeley for the source, and choosing
the latter shows a list of available databases in the Mendeley data
directory.
Known fields that aren't valid for a type are stored in Extra.
Files in the Mendeley 'Downloaded' folder are stored. Files elsewhere
are linked.
- Add a File Handling section to the General pane of the preferences,
and move several prefs from Miscellaneous to there
- Add a UI to that section for choosing the PDF handler
- Update Zotero.launchFileWithApplication() to use /usr/bin/open on
macOS if the handler is an .app (which it will be if set through the
chooser, since it's limited to Mac applications, though an executable
can still be set via the hidden pref if desired for some reason)
- Move prefs for style/translator updates and translator error reporting
(which isn't particularly relevant anymore in the client) to Advanced
By default the PDF handler chooser says "System Default", which isn't
the nicest thing, and there's probably a way to get/guess the system
default, since Firefox seems to know it (at least on macOS), but I
couldn't quickly find a way to do it.
Addresses #1450
Applies to dragging to the collections pane or the items pane, adding
via New Item menu, or saving via the connector server
If the renaming pref is enabled, the PDF is renamed after recognition.
Can be disabled in the preferences
Closes#917
Automatic renaming is now done for dragging of an external file onto an
item (as added in 7cb95f41) as well as dragging as a linked file,
dragging a non-native (not text or HTML) URL, "Attach Link to File…",
"Attach Stored Copy of File…", and "Retrieve Metadata for PDF". It only
applies if a single file is being added and if the parent item has no
non-HTML attachments. By default, the renaming only applies to PDFs, but
this can be changed with the renameAttachmentFiles.automatic.fileTypes
hidden pref.
A new General pref, "Automatically rename attachment files using parent
metadata", controls whether the renaming happens.
Files saved via web translators are renamed regardless of this pref,
because they would often be gibberish otherwise.
Closes#113
purgeDataObjects(), which runs at the beginning of the sync process,
uses transactions, and those can fail after the default wait timeout if
there's another active transaction. Instead, check explicitly for
another transaction and, if there is one, display a nice message and
wait for it to finish. This isn't foolproof, but it should reduce the
frequency of "operation timed out" sync errors. (Avoiding all long
transactions would be a better solution.)
"Delay citation updates until manual refresh" would be fine in the doc
prefs, but "until manual refresh" is a bit too awkward for the prompt.
Instead, go with @rmzelle's suggestion from #1242 of referring to
"automatic citation updates", and invert the checkbox.
- When a child note is opened in a separate window, the parent window is
selected. (This used to work but was broken in 5.0.)
- When a top-level note is opened (via double-click), the right-hand pane
changes to show "Editing in separate window".
- If a note that's currently open in a separate window is clicked on,
the right-hand pane shows "Editing in a separate window".
- If a note window is closed and the item is selected, the note editor
reappears in the right-hand pane after the note is saved.
This will avoid unnecessary UI updates and data loss bugs from the two
notes getting out of sync (and is just generally cleaner).
Also:
- General cleanup of note display code
Restores the "Restore to Zotero Server" functionality, now using the
API:
1. Get all remote keys and send `DELETE` for any that don't exist
locally.
2. Upload all local objects in full (non-patch) mode using only library
version so that the remotes are overwritten.
3. Reset file sync history, causing all files to be uploaded (or, more
likely, reassociated with existing remote files).
Since these are treated as regular updates on the server, they'll sync
down to other clients normally. Unsynced changes by other clients might
still trigger conflicts.
This and Reset File Sync History can also now be run on group libraries,
with a library selector in the Reset pane (which I forgot to do with
React).
The full sync option is now removed from the Reset pane, since there
wasn't ever really a reason to run it manually.
We should be able to reimplement Restore from Online Library (#1386)
using the inverse of this approach.
Closes#914