Commit graph

11063 commits

Author SHA1 Message Date
Dan Stillman
07874d84bd
Merge pull request #1909 from fletcherhaz/snapshot
Update SingleFile for bug fixes
2020-11-17 16:02:13 -05:00
Dan Stillman
7c0cfd9420 Fix case of data dir not being created for new profile
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.
2020-11-17 15:57:16 -05:00
Dan Stillman
e575097e34 Missing line from 5b9e6497 to check schema integrity after crash 2020-11-17 01:26:46 -05:00
Dan Stillman
5b9e6497af Schema integrity check improvements
- Create userdata tables and indexes that are missing
- Delete tables and triggers that should no longer exist
- Run schema integrity check before user data migration
- Run schema integrity check after restart error

This is meant to address two problems:

1) Database damage, and subsequent use of the DB Repair Tool, that
   results in missing tables

2) A small number of cases of schema update steps somehow not being
   reflected in users' databases despite their having updated userdata
   numbers, which are set within the same transaction. Until we figure
   out how that's happening, we should start adding conditional versions
   of schema update steps to the integrity check.

This is currently only running the update check after a restart error,
which might not occur for all missed schema update steps, so we might
want other triggers for calling setIntegrityCheckRequired().
2020-11-16 18:13:48 -05:00
Dan Stillman
6bcc8af86b Add Zotero.DB.columnExists(table, column) 2020-11-16 17:50:52 -05:00
Dan Stillman
b0e065a4ae Don't return relative path from .attachmentFilename for linked files
https://forums.zotero.org/discussion/86139/zotero-item-attachmentfilename-should-only-return-filename
2020-11-13 11:43:00 -05:00
Dan Stillman
d5ac87648b Update submodules 2020-11-04 15:04:44 -05:00
Dan Stillman
b43bfcaca0 Update locales from Transifex 2020-11-04 15:02:42 -05:00
Fletcher Hazlehurst
a72ae14816 Fix bug with double saving of snapshots. 2020-11-02 17:24:14 -07:00
Fletcher Hazlehurst
c0ec91f26d Fix bug for empty title when a translator does not provide one. 2020-11-02 17:24:14 -07:00
Fletcher Hazlehurst
a2620b757d Update SingleFile and fix several bugs
- Using `sandboxPrototype` properly uses window as prototype
- This commit removes the need for our patch in babel-worker.js:
3d0bc4cf9f
- We properly inject into frames in the client if we ever include frames
2020-11-02 17:24:14 -07:00
Dan Stillman
367fea1847 Zotero.File.copyDirectory(): Fix copying of subdirectories on Windows
This fixes copying of the previous extracted SingleFileZ snapshots
between libraries.
2020-11-01 18:51:55 -05:00
Tom Najdek
67f4b5254c
Switch to pure js sass compiler 2020-10-30 13:15:30 +01:00
fletcherhaz
d16512c84f
Fix bug with async translate process never returning. (#1910)
When using `doImport` a promise is returned, but was lacking a catch a
statement to ensure completion.

This fixes #1882
2020-10-29 02:30:47 -04:00
Dan Stillman
7602ee68db Update Big Sur targeting in chrome.manifest 2020-10-27 02:42:22 -04:00
Dan Stillman
a0aef25de1 Update locales from Transifex and merge new English strings 2020-10-27 02:40:48 -04:00
Dan Stillman
2e2a4bca7f Follow automatic tags prefs when retrieving PDF metadata by ISBN
https://forums.zotero.org/discussion/85777/retrieve-metadata-for-pdf-creates-automatic-tags-even-when-pref-is-off
2020-10-27 01:27:57 -04:00
Dan Stillman
38b997bee9 Update strings for Word Startup folder misconfiguration
Follow-up to 3a684308cd
2020-10-27 00:48:36 -04:00
Dan Stillman
9fdf82aca5 Resolve relative attachment URLs with proxy: false
4bc8fab4f5 added support for `proxy: false` on attachment URLs in
translators, but it made that flag skip `resolveURL()` altogether, which
meant that relative URLs weren't resolved, rather than just skipping
proxying.

This may fix PDF downloads for some ScienceDirect pages (though I can't
test this one):

https://forums.zotero.org/discussion/85884/problem-downloading-pdf-via-zotero
2020-10-26 23:29:40 -04:00
Dan Stillman
daefc9c0ae Downgrade SingleFile module
4be877ca1e
breaks some things in our hidden browser. They can probably all be fixed
by adding `window.` (e.g., `setTimeout()` → `window.setTimeout()`), but
for now just use the commit before that one.
2020-10-24 01:15:21 -04:00
Dan Stillman
e31fa0b150 Update SingleFile submodule
Fixes resizing issue from
https://forums.zotero.org/discussion/85789/zotero-connector-zooms-web-pages-to-very-small-sizes
in Firefox, though seemingly not in Chrome (#1907)
2020-10-24 00:42:10 -04:00
Dan Stillman
35c5e568f5 Update version 2020-10-24 00:06:01 -04:00
Dan Stillman
bdc3cfcb97 Remove SingleFileZ submodule
Follow-up to 76ae5d9f59
2020-10-24 00:06:01 -04:00
Dan Stillman
29f48476a9 Use UnexpectedStatusException in Zotero.HTTP.loadDocuments()
Follow-up to 76ae5d9f59, which changed loadDocuments() to pass/throw an
Error on a non-2xx response code
2020-10-24 00:04:01 -04:00
fletcherhaz
76ae5d9f59
Switch back to SingleFile from SingleFileZ (#1904)
Our SingleFileZ integration would save images inside directories following the
SingleFileZ format. However, Zotero does not support syncing sub-directories of
attachments. This commit switch back to a single HTML file with base64 encoded
resources. We think that the 33% increase in resources will be offset by the
compression of HTML and removal of JavaScript and unused CSS.

This commit does not fix past snapshots that were saved using SingleFileZ.
2020-10-23 19:39:07 -04:00
Adomas Venčkauskas
3a684308cd Add strings for Word plugin install failure 2020-10-23 13:37:58 +03:00
Dan Stillman
93d3a4be7a Update translators 2020-10-15 17:42:38 -04:00
Dan Stillman
679a1acb90 Fix "Web Page" showing in New Item menu for new databases 2020-10-15 16:24:17 -04:00
Dan Stillman
e9afd153e9 Log HTTP error bodies when responseType is explicitly set to 'text'
Previously they were only logged if responseType wasn't set
2020-10-14 19:33:46 -04:00
Dan Stillman
828ec4010e Don't allow items to be set as their own parents, and correct existing 2020-10-14 19:33:46 -04:00
Dan Stillman
6b626ba992 Fix error in Mendeley import (regression from 8fc316f727)
"Zotero.Relations.getByPredicateAndObject(...).filter is not a function"
2020-10-13 16:45:31 -04:00
Fletcher Hazlehurst
bb8325ff9b Fix tests for new version of SingleFileZ 2020-10-13 11:08:23 -06:00
Fletcher Hazlehurst
9b9bafe48e Update SingleFileZ submodule 2020-10-12 17:28:04 -06:00
Dan Stillman
6588f6612d Update version 2020-10-12 17:26:54 -04:00
Dan Stillman
1307fdfae7
Merge pull request #1899 from fletcherhaz/snapshot
Fix server not handling empty body in multi-part request. Fixes #1897
2020-10-12 17:25:22 -04:00
Fletcher Hazlehurst
bb0ddbd872 Fix server not handling empty body in multi-part request
An empty body is still valid. Was causing an issue for empty favicons.

https://forums.zotero.org/discussion/85600/bug-report-no-snapshot-in-zotero-beta
2020-10-12 15:06:11 -06:00
Dan Stillman
1ac79c0974
Merge pull request #1896 from fletcherhaz/snapshot
Fix CORS issues in SingleFile
2020-10-11 23:18:11 -04:00
Fletcher Hazlehurst
ed304b56e0 Remove crossorigin attributes in snapshots.
When loading a snapshot locally, same-origin of null will not load them
2020-10-11 18:19:41 -06:00
Fletcher Hazlehurst
dadc64e0d5 Extract SingleFile config so we can share with connector 2020-10-11 17:25:18 -06:00
Dan Stillman
479f01fa9c Fix in-client SingleFile saving on Windows
https://forums.zotero.org/discussion/85538/zotero-5-0-91-beta-not-saving-snapshots-d672469174
2020-10-08 18:44:50 -04:00
Dan Stillman
71550deb98 Fix URL resolving during translation in Zotero client
Regression in c0b6712923

The URL constructor isn't available in XPCOM.
2020-10-05 23:38:28 -04:00
Dan Stillman
d3c481fcf6 Fix bundled attr() when attribute doesn't exist
Regression from 4efc0af119
2020-10-05 23:36:06 -04:00
Dan Stillman
bb44841a80 Update locales from Transifex 2020-10-04 18:18:46 -04:00
Dan Stillman
987b9ce4cb Fix zotero://open-pdf links with page for PDF Expert
https://forums.zotero.org/discussion/comment/365610/#Comment_365610
2020-10-04 18:05:03 -04:00
Dan Stillman
328865299b Add SingleFileZ to about window 2020-10-03 17:57:59 -04:00
Dan Stillman
dc41e82833 Update submodules 2020-10-03 17:51:07 -04:00
Fletcher Hazlehurst
37cdba6f40 Clean up code from SingleFile error handling fix 2020-09-28 12:00:36 -07:00
Fletcher Hazlehurst
1c5cefaffd Fix handling of network errors for SingleFile save 2020-09-28 10:43:32 -07:00
Dan Stillman
20c8cede4d
Merge pull request #1846 from fletcherhaz/snapshot
Use SingleFile to create snapshots of web pages
2020-09-24 18:08:34 -04:00
Dan Stillman
cae2aab70f Reduce startup time from retraction key caching 2020-09-23 22:58:53 -04:00