We're now flagging the DB for repair on startup errors, so if that fixes
the problem (e.g., because of our undiagnosed skipped-schema-update-step
problem), we'd still like to know about it.
But skip it at startup, even if flagged on, if there are schema update
steps to perform, to avoid creating tables that aren't expected to exist
yet.
Originally added in 5b9e6497a but disabled in c4cc44528 and 7a434df53
This lays the groundwork for moving collections and searches to the
trash instead of deleting them outright. We're not doing that yet, so
the `deleted` property will never be set (except for items), but this
will allow clients from this point forward to sync collections and
searches with that property for when it's used in the future. For now,
such objects will just be hidden from the collections pane as if they
had been deleted.
changedData is the new approach to updating DataObject data, storing the
new values in a separate object until save so that they don't actually
change the object unless the save goes through.
- Add DataObject._getLatestField() to return either the changed value or
the last-saved value
- Clarify that _markFieldChange() takes different values depending on
whether the field uses 'changed' or 'changedData'
- Fix bug calculating hasChanged() when a 'changedData' value is a
boolean
If a group library was deselected in the "Choose Libraries…" window, a
remote change would still trigger a sync if auto-sync was enabled. (My
Library was not affected.)
If we add the notifier queue, another save function will use that queue
but not necessarily know that it needs to commit. Instead, we only use
the notifier queue for this function.
- Use the "Chrome" theme
- Hide the gutter
- Don't highlight the active line
- Remove default iframe borders
- Focus the editor on window open
Ace instances (e.g., Scaffold) are now responsible for setting their own
theme (to avoid a flash of Monokai before a lighter theme appears).
Originally added in 5b9e6497a. We stopped running the integrity check
before userdata upgrades in c4cc44528 because this new behavior was
breaking upgrades, but it could still be run when coming from the DB
Repair Tool, which could cause problems if, say, you recovered a
database from a computer that had an older version of Zotero and ran the
DB Repair Tool on it. Disabling this for now until we have a better
solution.
The Quick Format dialog's shape is based on the OS window corners, and
that changed on Big Sur, which resulted in whitespace along the bottom
edge and a misaligned search results box.
The tops of the citation bubbles were also cut off (at least for me) on
Catalina.
If a translator couldn't be parsed, `_translatorInfo` wouldn't be set,
and that would somehow cause the translator info for subsequent
detections to be out of sync with the code loading, and nothing would
work. Putting a try/catch around the eval() allows subsequent
translators to continue to work normally. (There might be a better fix,
but this seems to work.)
This was happening for Better BibTeX translators that were still
installed without the extension (which they need to be parsed properly),
causing all imports to break.
https://forums.zotero.org/discussion/86613/error-id-1093166052-upload-of-ris-and-bibtex-data-failed
- Use cookies from browser pane when running detectWeb or doWeb
- Use cookies from document when running or updating tests
This should fix various cases where translators can't be properly
developed or tested in Scaffold (e.g., [1]).
[1] https://github.com/zotero/translators/pull/2296#issuecomment-739116620
After a local item change, Zotero uploads the JSON and then applies the
saved JSON returned from the API to the local object using `fromJSON()`,
the same as it would apply any other remote change.
`fromJSON()` is meant to migrate Extra lines into real types and fields
after future item type/field changes. It calls
`Z.Utilities.Internal.extractExtraFields()`, which looks for valid item
type or CSL type values in Type lines in Extra, handles the rest of
parsing accordingly, and passes back the parsed item type. `fromJSON()`
wasn't handling `itemType` in the response object, so the item type
didn't get applied and the Type line was stripped. This fixes that.
Since valid type values are now parsed, if you have a Journal Article
item with a Pages field and enter "Type: song" into Extra and sync, the
item will be converted to Audio Recording and `Pages: 123` will be
placed in Extra.
https://forums.zotero.org/discussion/comment/369221/#Comment_369221
Creating missing tables breaks schema update steps that assume those
tables don't exist, so we'll need another solution here. For now,
disable the automatic integrity check and make a couple recent schema
update steps more forgiving for people on the beta who already triggered
this.
If there was an existing ~/Zotero directory, another profile was already
pointing to it, and there was a Firefox profile pointing to a custom
data directory or with an embedded 'zotero' directory, the Firefox data
directory would be used instead of creating a new data directory named
after the new profile.
This skips the Firefox logic for new profiles when there's an existing
profile pointing at ~/Zotero and just creates the new data directory.