https://forums.zotero.org/discussion/104431/syncing-problem
Replace Online Library can upload annotations created by others in a
group library, so if the upload resulted in a local write, "Cannot edit
item in library" was thrown, since annotations by others aren't
writable. This should've only been a problem if the uploaded data was
actually modified by the server, but we were also checking whether
objects were editable before checking if they had actually changed, so
it would happen for any upload of another person's annotation.
This fixes the order of checks when saving objects and makes an
edit-check exception for saving uploaded data for group annotations.
Prevents bug in zotero-citation plugin (at least on macOS) from creating
a search that breaks syncing
We were already checking for a missing name in `saveTx()`, but the
plugin is saving the same search twice in rapid succession, the second
time without a name, and the second attempt clears the search object's
name value after the first save's `_initSave()` check and before its SQL
write. The second save fails, but the first save goes through without a
name, resulting in a sync error.
https://forums.zotero.org/discussion/104274/id-1702002152-cannot-synchttps://github.com/MuiseDestiny/zotero-citation/issues/31
We still use base-only fields as search conditions, and schema.json
consumers might want to do so as well, so it makes sense to include
them.
Also remove base-only localized strings from `searchConditions` that are
already included in `itemFields.`
This fixes an error using Everything if another library hasn't yet been
loaded and should speed up Everything searches for people with multiple
libraries.
This is sort of an awkward fix, because it doesn't fix the underlying
problem of `addCondition('libraryID', ...)` not working the same as
`.libraryID =` for some search conditions that perform subsearches. But
supporting `addCondition('libraryID', ...)` for those would get
complicated, because there could technically be multiple such
conditions, and applying those to a subsearch that used `AND` would get
messy. So let's just fix the problem at hand.
Fixes#3032
Or at least a way that we already have built-in and that only applies to
the call in `Zotero.Item::migrateExtraFields()`. This doesn't
distinguish between CSL fields (`publisher-place`, `event-place`,
`issued`) and actual Zotero field, and we really only need to skip
the former, but it's fine.
Follow-up to 8a1dd3637, related to #3030
It does not appear to be possible to create a creator with no values in
Mendeley, however we got reports of these causing the imports to fail.
This tweak makes the importer more resilient by discarding empty/invalid
creators.