Commit Graph

9529 Commits

Author SHA1 Message Date
Dan Stillman
8fced28e89 Update locales from Transifex 2018-02-11 15:13:14 -05:00
Dan Stillman
2ece5f04fe Update version and submodules 2018-02-11 14:17:26 -05:00
Dan Stillman
aa56ebae1a Fix "channel is undefined" for invalid HTTP response during WebDAV sync
Follow-up to 4bbae6e17

We're now using Zotero.HTTP.request(), which does its own checking for
security errors, so there's no need to do WebDAV-specific checks (though
we could consider checking for Zotero.HTTP.SecurityError and showing
more specific messages, since a self-signed certificate is more likely
in the case of WebDAV).

(cherry picked from commit f04a8c3736)
2018-02-11 14:15:49 -05:00
Dan Stillman
b5aeeaa60b Better handling of invalid HTTP responses
If a server returns an invalid HTTP response (e.g., Content-Encoding:
gzip with a plaintext body, a.k.a. NS_ERROR_INVALID_CONTENT_ENCODING)
but we can still parse a 4xx or 5xx HTTP response code, use that for the
XHR status, since it might be enough for what we need to do (e.g.,
verify a 404 from a WebDAV server). This fixes a current problem with
Box [1].

Also fix a "msg is not defined" error when the XHR status is 0 but the
SSL connection is fine and include the channel and response status on
the UnexpectedStatusException object (though both of these would now
only happen on an invalid 2xx response, when the XHR status would remain
as 0).

[1] https://forums.zotero.org/discussion/comment/301014/#Comment_301014

(cherry picked from commit 4bbae6e17a)
2018-02-11 14:15:45 -05:00
Dan Stillman
9304042cd4 Fix detection of WebDAV settings changes when clicking Verify Server
onchange() weirdly isn't called when clicking off the textbox to a button

Fixes #1291

(cherry picked from commit 1aade0f268)
2018-02-11 14:15:41 -05:00
Dan Stillman
0617392e81 Show "More Information…" button on WebDAV SSL cert error
(Though the button takes you to to
https://www.zotero.org/support/kb/ssl_certificate_error rather than
https://www.zotero.org/support/kb/incomplete_cert_chain, since the error
comes from Zotero.HTTP.)

(cherry picked from commit e9a3f9b0e0)
2018-02-11 14:15:34 -05:00
Dan Stillman
431197992b Fix "msg is not defined" on HTTP connection failure
(cherry picked from commit 84d8bb4020)
2018-02-11 14:15:29 -05:00
Dan Stillman
b4311e08e2 Wait for any DB transactions to finish before starting sync
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.)

(cherry picked from commit bd7e1b222d)
2018-02-11 14:15:18 -05:00
Dan Stillman
6c18e9e260 Fix "Can't queue event outside of a transaction"
If a transaction took over 30 seconds and another transaction timed out
waiting for it, the second transaction would reset the notifier queue,
but if the first transaction then tried to queue an event, it would fail
with this error and roll back. (It would be nice to figure out why
transactions are taking over 30 seconds, though.)

(cherry picked from commit 3f6ecc0021)
2018-02-11 14:15:12 -05:00
Dan Stillman
cc84a24995 Remove fail() override in Mocha
I'm not sure what this was for, but at least with an async test function
it seems to be causing spurious "the string 'x' was thrown, throw an
Error :)" messages that hide the real error.

(cherry picked from commit 4731b8f905)
2018-02-11 14:15:07 -05:00
Dan Stillman
4290ebcc16 Use rowid to clean invalid entries from translatorCache
Since in truly weird cases [1] fileName might not exist

https://forums.zotero.org/discussion/comment/300558/#Comment_300558
(cherry picked from commit 06fb74aafd)
2018-02-11 14:14:28 -05:00
Dan Stillman
6ae0c6055e Allow dragging parent items to collection if children are selected
This is a simplified version of the fix from #872. Unlike the proposal
in #36, this doesn't require all child items to be selected, since in a
search some children might be grayed out. If the child of an unselected
parent item is included, the drag isn't allowed.

Closes #36

(cherry picked from commit 38411fb56c)
2018-02-11 14:14:13 -05:00
Dan Stillman
410976f991 Allow parentItemID as a createDataObject() parameter in tests
Not just `parentID`

(cherry picked from commit ad216bcf97)
2018-02-11 14:14:09 -05:00
Dan Stillman
5dbae77c98 Reduce minimum width of Zotero pane to 670px
We could potentially do more, but this is the narrowest the pane can be
with the left pane collapsed without starting to hide toolbar icons, so
let's try this. (This will still hide the sync icon if the left pane
isn't collapsed.)

Closes #675
Closes #1183

(cherry picked from commit 2d43518ef2)
2018-02-11 14:13:50 -05:00
Dan Stillman
f38cd21195 Don't show Title in column picker, because hiding it doesn't make sense
(cherry picked from commit e4a399671a)
2018-02-11 14:13:44 -05:00
Dan Stillman
42095b0b42 Update citeproc-js to 1.1.183
(cherry picked from commit 4a41f219d8)
2018-02-11 14:13:06 -05:00
Dan Stillman
83ae42e5a0 Fix test breakage from d67c654245
(cherry picked from commit 5b46735204)
2018-02-11 14:12:50 -05:00
Dan Stillman
575866005a Prompt to reset local group files on 403 for file attachment upload
And reset modified file attachments when resetting files

(cherry picked from commit c5fa1303e3)
2018-02-11 14:12:43 -05:00
Dan Stillman
3eae1a59fe Add version option to toResponseJSON()
(cherry picked from commit d67c654245)
2018-02-11 14:12:38 -05:00
Dan Stillman
0b951785f4 Warn about version 0 when saving to sync cache
This should be an error, because the API will never return 0, but most
tests don't currently set the version properly in the response JSON.

(cherry picked from commit 3390f2405b)
2018-02-11 14:12:35 -05:00
Dan Stillman
df3956fbed Enable 2x PDF icon
(cherry picked from commit 0bb0912a7b)
2018-02-11 14:11:34 -05:00
Dan Stillman
be300ec62b Fix startup hang if note is null in database
(cherry picked from commit 2194dff7a4)
2018-02-11 14:10:26 -05:00
Dan Stillman
1bdb329bc8 Add missing spinners from 87cf336e2
(cherry picked from commit 48757f08ff)
2018-02-11 14:09:36 -05:00
Dan Stillman
50862501f6 Fix translator architecture hangs on bad JSON in translatorCache
(cherry picked from commit cc9efde843)
2018-02-11 14:09:20 -05:00
Dan Stillman
250a19ec03 Start sync icon spinning before purging data
(cherry picked from commit 2b8311d3d7)
2018-02-11 14:08:09 -05:00
Dan Stillman
ea29c5cb10 Update version 2018-02-03 02:46:10 -05:00
Dan Stillman
12c9e55472 Update version and submodules 2018-02-03 00:52:15 -05:00
Dan Stillman
380ee9c0ed Update version 2018-01-22 15:39:17 -05:00
Dan Stillman
4ed33b4da9 Run deploys from Travis on *-hotfix branches 2018-01-22 05:32:50 -05:00
Dan Stillman
ff9ee48e0f Update version 2018-01-22 05:30:18 -05:00
Dan Stillman
e577009154 Update version 2018-01-19 19:23:45 -05:00
Dan Stillman
246d7af3eb Force ZIP build on Travis 2018-01-19 13:45:25 -05:00
Dan Stillman
2edf2641a2 Update version 2018-01-19 13:34:23 -05:00
Dan Stillman
fec3fa2a72 Update locales from Transifex 2018-01-11 20:23:13 -05:00
Dan Stillman
09fc3c2b1c Update submodules 2018-01-11 20:20:32 -05:00
Dan Stillman
7cb95f4129 Automatically rename dragged file attachments from parent metadata
Rename happens if only one file is dragged and the parent item has no
existing file attachments.

Closes #1405
2018-01-10 00:39:47 -05:00
Dan Stillman
ea2feadbff Add spacing between icon and search field in Quick Format window 2018-01-08 01:08:44 -05:00
Dan Stillman
87cf336e22 Cancel active Quick Format search if another one starts
This fixes inconsistent results (#1349) from async searches finishing
out of order.

Also adds spinner when search is active
2018-01-08 01:08:28 -05:00
Dan Stillman
7d41047a9d Blacklist spurious warnings about word processor plugin update manifests 2018-01-08 00:02:47 -05:00
Dan Stillman
c83de8a6ea Increase save time for Accessed test for Travis 2018-01-05 06:04:53 -05:00
Dan Stillman
3f6ef7fb01 Allow "now" in Accessed field to use current time
Closes #1340
2018-01-05 03:41:08 -05:00
Dan Stillman
5847388862 Add schema update step to remove dc:isReplacedBy relations
These should've all been replaced with dc:replaces relations in a schema
update step, so any that exist were likely synced down from the API
(since fixed) and should be obsolete/redundant.
2018-01-05 02:53:27 -05:00
Dan Stillman
4ac368e052 Add "Publication" to top level of search condition drop-down 2018-01-04 22:59:23 -05:00
Dan Stillman
fdb9e20076 Clear parentKey change marker after save
Fixes #1325, Field editor closes during auto-sync of newly created
parent item
2018-01-04 19:10:41 -05:00
Dan Stillman
2baa537542 Don't close clicked field when clicking away from changed field
Fixes #1401

The item box badly wants to be redone in React.
2018-01-03 02:33:36 -05:00
Dan Stillman
374eefada1 Additional try/catch to fix NS_ERROR_UNEXPECTED from tree select
Follow-up to 7cd1439928
2018-01-02 20:20:01 -05:00
Dan Stillman
2bc44dddd1 Add attr()/text() to translator sandbox
The current document is automatically used (but can still be provided as
the first argument to avoid accidental bugs during the transition).

Closes #1323
Addresses zotero/translators#1277
2017-12-27 18:26:51 -05:00
Dan Stillman
5350931617 Update locales from Transifex 2017-12-27 17:13:51 -05:00
Dan Stillman
c4fde7ebbf Fix undo in notes to not restore changes from another note
Fixes #1398
2017-12-27 17:13:39 -05:00
Dan Stillman
5fcac10db9 Update locales from Transifex 2017-12-20 21:48:36 -05:00