Commit graph

11822 commits

Author SHA1 Message Date
Abe Jellinek
a4e0eaaba4 Style configurator: Log error and discard invalid locale values 2025-10-16 15:10:35 -04:00
Abe Jellinek
c76371aeed Style configurator: Don't use string interpolation to build XUL 2025-10-16 15:10:35 -04:00
Dan Stillman
feaa36a700 Update restore-to-server strings from Transifex 2025-10-09 14:50:29 -04:00
Abe Jellinek
0852296dd8 Document Preferences: Add missing FTL to fix variable in title
Fixes #5570
2025-10-09 13:10:41 -04:00
Dym
a7421eccc2 Local API: Resolve 500 error on single item export (#5560) 2025-10-09 13:09:23 -04:00
abaevbog
c339d52ec3 tagsbox: fix deleted tags reappearing (#5533)
https://forums.zotero.org/discussion/110655/z7-beta-tags-reappear-after-quickly-deleting-them

If a library has many tags and one quickly clicks on "-" button
to deleted multiple tags from an item, the database updates
may not keep up with UI. To address this, save item only
once after a debounce.

Fixes: #5410
2025-10-09 13:09:16 -04:00
Abe Jellinek
035a03fdf2 Item pane header: Only pre-cache CSL.Engine if set to bibEntry mode 2025-10-08 13:46:59 -04:00
abaevbog
ace4d92136 fix "Next" button not appearing in merge dialog (#5563)
On windows and linux.
Fixes: #5561
2025-10-08 13:46:33 -04:00
abaevbog
8374dde232 no find-as-you-type on 0 keypress in itemTree (#5564) 2025-10-08 13:46:27 -04:00
abaevbog
5ad6704da8 Fix item sometimes not added to collection on cross-library drag-drop (#5547)
When drag-dropping items into a collection in another library,
perform the addition to collection in the same transaction
as creating a new item in the target library.

When the librariesCollectionsBox refreshes on the `modify` event
when a newly created group item is linked to the selected item,
it re-loads the data of the linked item via item.loadAllData().
This could happen after the item is added to the collection
but before this change is saved. In that case, item._changed.collections
would be cleared, and when the item is saved, there would be
no changes to collections to save.

Fixes: #5539

Also, cleanup leftover unused logic of restoring linked item
from trash on drop that was removed in 2dd16b44d6
2025-10-08 13:45:54 -04:00
Abe Jellinek
a82d04304f Style installation: Don't prompt on validation error in silent mode 2025-09-14 03:04:22 -04:00
Dan Stillman
fcec11ee13 Fix max-width on hardConfirmationDialog and reduce input font size 2025-09-13 18:36:16 -04:00
Tom Najdek
458bbd90a9 Display the number of items that would be deleted when replacing the online library (#5359)
And require checkbox or text challenge depending on the severity of the
action

Includes replacement for Set.prototype.difference() for Fx115

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2025-09-13 18:36:16 -04:00
Dan Stillman
740a7601eb File sync: Use filtered filename when renaming from multi-file ZIPs
Follow-up to bab0237727
2025-09-13 18:36:16 -04:00
Dan Stillman
b50e18059b File sync: Rename single HTML file within multi-file ZIP to known name
If a file was renamed remotely and a new copy wasn't uploaded for some
reason, the ZIP wouldn't contain the new filename. We already renamed a
single file within the ZIP to match the new filename, but now we also
rename a single HTML file in old multi-file snapshot ZIPs. If there are
multiple HTML files for some reason (old-style ZIP with iframes?), we
let the user fix it.

And then we can stop reuploading files after renames.
2025-09-13 18:36:15 -04:00
Dan Stillman
998fee9bc2 Rename file on remote filename change during sync
Previously, the local file wasn't renamed, so it would become unlinked.
Since we currently force reuploading/reregistering of files when they're
renamed, opening the attachment would then redownload the modified
remote file, but there's no need for the file to become unlinked in the
first place.
2025-09-13 18:36:15 -04:00
Abe Jellinek
20c66b5aa1 Stop using restoreProcessorState() (#5516)
restoreProcessorState() breaks locale-specific punctuation (and is
deprecated).

rebuildProcessorState() is enough if we're passing an empty citation
list; if we're reinitializing with a new non-empty list, call
updateItems() first.

Also:

- Add tests for this issue and for potential regressions in disambiguation handling
2025-09-13 18:36:15 -04:00
Adomas Venčkauskas
05e9f756e7 Fix note type picker appearing for Google Docs
Report https://forums.zotero.org/discussion/126026/endnotes-option-showing-in-google-docs
2025-09-13 18:36:15 -04:00
abaevbog
8344caeae0 qf: fix breakage if unloaded tab's item is deleted (#5535)
Fixes: #5534
2025-09-13 18:36:15 -04:00
Tom Najdek
25e0f35230 Enable u RegExp flag in file renaming by default (#5522) 2025-09-13 18:36:14 -04:00
abaevbog
5bbf4fb664 avoid relation to self after merging related items (#5488)
When copying over relations during merge of items
that are related to one another, avoid relating the
chosen main item to itself.

Fixes: #5487
2025-08-16 11:26:58 -04:00
Abe Jellinek
6c390ad56c Handle invalid path when launching/revealing on macOS (#5485) 2025-08-16 11:26:45 -04:00
Abe Jellinek
d6f83e5f6c Clean up JSDoc comments and unused field (#5443) 2025-08-14 10:42:41 -04:00
Abe Jellinek
72c229eda4 Find Full Text: Simulate ProQuest redirect back to original page (#5443)
We don't follow JS redirects, so this is necessary in order for
us to get to a translatable page after authentication.
2025-08-14 10:42:26 -04:00
Abe Jellinek
1fa0824027 Attach CookieSandbox to Find Full Text requests and translation (#5443)
With a 24-hour validity per site (eTLD+1).
2025-08-14 10:42:21 -04:00
abaevbog
a899accd76 filter out trashed items in relatedBox (#5482)
If the item itself is trashed, all related items are displayed
(trashed or not).

Fixes: #1780
2025-08-14 10:32:16 -04:00
Dan Stillman
ea97c960cb Better method of unsetting and restoring Mozilla environment variables
Hopefully a better fix for #4981, which wasn't working properly on at
least some Linux systems because the variables were getting restored
before the subprocess launched. This delays a (debounced) second, to
give the subprocess time to start, and then automatically restores the
variables.

An explicit restart via app code also immediately restores the
variables, since restarts on Linux inherent the environment and don't
use our startup script. (An upgrade restart could still happen when the
variables were cleared, but you'd have to be extremely unlucky --
launching URLs or files while also performing a manual restart the same
second.)
2025-08-14 10:32:04 -04:00
Dan Stillman
1cf03e6f45 "Caching" → "Cached" in CSL.Engine cache debug line to clarify timing 2025-08-14 10:31:33 -04:00
Dan Stillman
cf91d62e59 Update citeproc.js to include Juris-M/citeproc-js#256 2025-08-14 10:31:24 -04:00
Dan Stillman
d1d62cb91d Update citeproc.js to latest build
Includes Juris-M/citeproc-js#253 and Juris-M/citeproc-js#254
2025-08-14 10:31:16 -04:00
Abe Jellinek
90d7082a5d Clear _blockingObserver field when it was never initialized
Follow-up to cc3fc42b0a
2025-08-14 10:31:09 -04:00
Abe Jellinek
75ce9f07b7 Catch BlockingObserver error when reader is closed immediately
https://forums.zotero.org/discussion/125841/cannot-open-a-pdf-file-in-a-new-tab
2025-08-14 10:31:01 -04:00
Adomas Venčkauskas
76c0c9d0ce Fix Google Docs integration breaking when cancelling edit bibliograpy
I've run into this randomly. It only occurs if the first operation on a
Google Doc since Zotero restart is the edit bibliography dialog which
you cancel. Due to how the HTTP integration client is implemented, the
missing await causes it to try to send another response to the Connector
(which is no longer waiting on the /response endpoint), failing and
causing a forever pending promise, which makes subsequent attempts to
interact with the Google Docs plugin no-op.

We get occassional reports from users about Google Docs getting stuck
that is fixed by Zotero restart, so hopefully this will reduce those.
2025-08-14 10:30:35 -04:00
Abe Jellinek
42ff572a6d Don't merge into a missing snapshot attachment (#5459) 2025-08-14 10:30:24 -04:00
abaevbog
ef5f8be920 fix subcollection not being copied to library root (#5464)
Fixes: #5463
2025-08-14 10:30:18 -04:00
Dan Stillman
8379bdc8cd ZFS: Don't retry download for canceled redirect with mtime/hash match
This was a regression from the switch to `Zotero.HTTP.download()`. 302
wasn't a success code, so `HTTP.download()` would throw, and since the
status wasn't set correctly on the `XMLHttpRequest` within
`HTTP.UnexpectedStatusException`, it would think it was an interrupted
S3 connection and trigger another download after a delay.
2025-07-26 01:32:22 -04:00
Dan Stillman
bd11fd7234 HTTP.download(): Don't save file for non-2xx response 2025-07-26 01:32:21 -04:00
Dan Stillman
cf44d4333d HTTP.request(): Return proper status for canceled redirect 2025-07-26 01:32:21 -04:00
Dan Stillman
8f673efdd6 Update styles and CSL locales 2025-07-25 02:42:10 -04:00
Abe Jellinek
c10bb6f318 If custom file handler is set to Zotero itself, use reader (#5407) 2025-07-25 02:42:10 -04:00
Abe Jellinek
176d8d7328 Cache CSL Engine for item pane header (#5405)
Once styles are initialized.
2025-07-25 02:42:10 -04:00
Adomas Venčkauskas
fa52445ae6 Server: Add support for UTF in server headers (RFC2047) 2025-07-25 02:42:10 -04:00
Abe Jellinek
81d9ed77e9 Unregister Zotero_Tabs observers when window is unloaded 2025-07-23 23:56:05 -04:00
Abe Jellinek
7b56a3eefe Cache CiteProc Engine instances, pre-cache for Quick Copy (#5399) 2025-07-23 23:56:05 -04:00
Dan Stillman
b95f9eea89 Use BrowserDownload for 403 when enforcing type in downloadFile()
Fixed regression (probably in 1f401f0897) causing Find Full Text not to
use BrowserDownload for a 403

https://forums.zotero.org/discussion/125581/zotero-suddenly-fails-to-retrieve-full-text-although-i-have-access
2025-07-23 23:56:05 -04:00
Northword
445737c261 Clear plugin cache on re-install (#5395) 2025-07-23 23:56:05 -04:00
SSCC
6dbefee007 fix the missing "yield" in line 158 of storageEngine.js (#5394)
Fix the issue where Zotero.Sync.Runner.sync({background: true}) cannot obtain the itemIDs
2025-07-23 23:56:05 -04:00
Tom Najdek
47f2821a3d Use a more universal method of checking the element name 2025-07-23 23:56:05 -04:00
Tom Najdek
78c1039a9f Fix auto-completion typo toLocaleLowerCase -> toLowerCase 2025-07-23 23:56:04 -04:00
Tom Najdek
7c662dd59d Fix incorrect context menu when renaming collection #5374 2025-07-23 23:56:04 -04:00