Commit graph

1662 commits

Author SHA1 Message Date
Dan Stillman
bdd3b1df59 Fix UNC paths test for updated Zotero RDF translator
zotero/translators@9906b24d changed the file path predicate from
rdf:resource to z:path.
2026-03-26 10:37:14 -04:00
Adomas Venčkauskas
a6aa02e1ab Auto-recover ALL-CAPS macOS corrupted word field codes.
Closes zotero/zotero-word-for-mac-integration#38
2026-03-05 23:30:40 -05:00
Tom Najdek
fe33482ab9 Fix tag splitting for strings containing Unicode characters. Fix #5807 2026-03-05 23:30:01 -05:00
Dan Stillman
10c74d33c9 WebDAV: Compute fresh Digest auth headers for each request
The previous approach of capturing and replaying the Authorization header
from an initial request worked for Basic auth but broke with Digest auth,
where the header includes the HTTP method and URI in the hash. This caused
each replayed request to be rejected with a 401, which Firefox wouldn't
retry because the request already included Authorization.

Instead, split _channelAuthorization into _basicAuthHeader and
_digestParams. For Basic auth, the header is still replayed as-is. For
Digest, the challenge parameters (realm, nonce, qop, etc.) are cached
and a fresh Authorization header is computed per request.

_getAuthorizationHeaders() now takes method and URI parameters so it can
compute the correct Digest response hash for each request.
2026-03-05 23:27:18 -05:00
Dan Stillman
1205349330 Fix WebDAV verification failure on OPTIONS/PROPFIND auth type mismatch
`checkServer()` was capturing the Authorization header from OPTIONS and
explicitly setting it on PROPFIND via `setRequestHeader()`. If the auth
type didn't match what the server required for PROPFIND (e.g., Basic vs.
Digest, though maybe other things too), the explicit header could
prevent Firefox from negotiating the correct auth scheme on the 401
challenge.

To fix, move `onAuthorizationHeader()` from OPTIONS to PROPFIND and
don't pass captured auth to PROPFIND, letting Firefox handle the auth
transparently.

https://forums.zotero.org/discussion/129665/webdav-error-for-zotero-8-0-3
2026-03-05 23:24:07 -05:00
abaevbog
5aa1c700cc Preference to hide context annotation rows (#5315)
hideContextAnnotationRows pref, accessible via View > Hide Non-Matching Annotations,
will hide non-matching context annotation rows.
Enabled by default.

Fixes zotero#5264
2026-02-06 15:34:32 -05:00
Dan Stillman
2d4ef19f41 Use PROPFIND instead of OPTIONS to cache WebDAV credentials
Some WebDAV servers allow unauthenticated OPTIONS requests, so the
Authorization header capturing added in 089701eca8 wouldn't work.

PROPFIND with Depth: 0 reliably requires authentication while only
returning properties of the directory itself.

https://forums.zotero.org/discussion/comment/506993/#Comment_506993
2026-02-04 09:59:56 -05:00
Dan Stillman
089701eca8 Fix WebDAV authentication handling in fx140
Firefox no longer seems to send a previously used Authorization header
with subsequent requests. This results in extra requests, since every
WebDAV request triggers a 401, and also results in errors, because a PUT
is sent without Authorization, causing some WebDAV servers to
immediately send a 401 and close the connection, which the HTTP layer
interprets as a connection failure (status 0). (It's also not good to
try to send a large file just to get a 401.)

There might be some way to share context between requests, but instead,
just get the used Authorization header and include that explicitly in
future requests.

To test this properly, we have to switch to using httpd.js for all
WebDAV requests, since the mocked XHR doesn't trigger the 401 retry.

https://forums.zotero.org/discussion/129194/webdav-uploads-fail-on-zotero-8-put-sent-without-authorization-server-closes-connection
2026-02-01 16:42:55 -05:00
Dan Stillman
f3c0e4fdc2 Fix error resetting group library with unsynced embedded images
https://forums.zotero.org/discussion/129373/zotero-7-8-warning-when-syncing-group-library
2026-01-29 13:22:14 -05:00
abaevbog
22f62138a3
Fix quicksearch not finding annotations of standalone attachments (#5756)
Fix search not finding annotations of standalone attachments
when searching within a scope.

Fixes: #5751
2026-01-28 13:30:36 -05:00
Abe Jellinek
4880674668 Remove DOI when creating bookSection from book
And book from bookSection.

Closes #5732
2026-01-27 16:20:14 -05:00
Dan Stillman
2b262c5442 CI: Fix disabling of certain tests
Wrong property name
2026-01-27 13:34:25 -05:00
Dan Stillman
7d79ec01a5 CI: Disable "should add an item to My Publications" test due to errors
https://github.com/zotero/zotero/issues/5749
2026-01-27 12:14:01 -05:00
Abe Jellinek
8b446b7fc5
Set auto attachment title when not renaming (#5748) 2026-01-27 11:44:50 -05:00
abaevbog
1f9d9d2967
citation dlg: updates to locator shortcuts (#5529)
- after a new bubble is added to the citation, it is recorded
as a just-added bubble. The next locator typed without a search query
will go to that item instead of going to the item before where the locator was typed.
Same logic applies when multiple bubbles are added at once.
- the record of just-added bubbles is cleared on focusout
or keypress of an arrow key. That way, it's discarded if the user
is almost certainly not intending to immediately type a locator.
- added a special case to recognize a numeric value as a page locator
if it is typed when just-added bubble is recorded. That special locator
will be added to the just-added bubble as one is typing without
pressing Enter after debounce. Enter will immediately add the locator
without waiting for debounce.
- if a just-added bubble is recorded, cmd-z will clear
whatever numeric locator may have been typed and place
it back into the input, in case one meant to type an
actual search query

- added a special case to recognize ":<number>" as a page locator
in the same circumstances that "page <number>" is currently recognized
- do not use year extraction (SearchHandler._cleanYear)
when parsing input. It strips the first number from
a range of numbers and conflicts with the new locator
logic.
- ensure a bubble with a very long locator does not overflow
2026-01-26 20:12:44 -05:00
Dan Stillman
c9f34754a9 CI: Skip attachment pane preview test for now
Too many spurious failures

See #5624
2026-01-26 16:50:50 -05:00
Abe Jellinek
3c6ad491b5
Fix citations accumulating due to CSL.Engine caching (#5742)
* makeFormattedBibliographyOrCitationList(): Don't modify CSL.Engine state

Use previewCitationCluster(), which leaves the processor state alone,
instead of calling appendCitationCluster(), which has side effects and
isn't used anywhere else in Zotero.

* Make CSL.Engine caching opt-in

* Remove unnecessary CSL.Engine reinitialization

* Code style

* Add/update tests
2026-01-26 16:12:36 -05:00
Dan Stillman
c42f3b8174 Fix citing in Serbian locale
Fixes #5741
2026-01-26 15:14:19 -05:00
Adomas Ven
6697db1dba
Delete duplicate renamed styles on init (#5734)
After citation-style-language/styles#7928 renamed Vancouver styles to
NLM terminology, Zotero installations end up with both vancouver.csl
and nlm-citation-sequence.csl. To fix, on init, delete any installed style
whose ID appears in the renamed-styles mapping if the target style
also exists.

---------

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2026-01-26 10:35:43 -05:00
Dan Stillman
a34b845154 Update style test to use NLM citation-sequence instead of Vancouver 2026-01-26 00:43:06 -05:00
Abe Jellinek
3e248c703e
showAttachmentFilenames: Fall back on invalid attachment path (#5717) 2026-01-22 14:55:23 -05:00
Abe Jellinek
4399329b83 renderItemTitle(): Only split on known tags
Fixes #5708
2026-01-20 12:58:44 -05:00
Tom Najdek
d6fc06cd7c
File renaming: Allow local time conversion for accessDate (#5707) 2026-01-20 11:00:52 -05:00
windingwind
97d0bdbaea
Fix note tab reopen logic (#5706)
fix: #5704
Distinguish note editor CE and instance in var name
Add note editor CE _initPromise
Await CE init in various places
Add tests for note tab
2026-01-20 10:56:04 -05:00
Tom Najdek
eb62aad999
Extend emoji matching to include symbols
These were previously matched, before d1d4065d
2026-01-16 13:31:02 +01:00
Dan Stillman
0af7c56b7e Update sample data for tests, again
There's some bug where this has to be generated multiple times to be
correct.
2026-01-13 13:14:00 -05:00
Dan Stillman
395aadff4e Update sample data for tests 2026-01-13 13:05:23 -05:00
Dan Stillman
2bb8ba60ad Fix test after adding eventPlace to conferencePaper 2026-01-13 12:50:00 -05:00
Tom Najdek
d1d4065dae
Add support for displaying country flag emojis in the Items List (#5700) 2026-01-13 11:50:47 -05:00
Dan Stillman
e478c89ca0 Fix base-mapped fields not being migrated from Extra
https://forums.zotero.org/discussion/comment/505322/#Comment_505322
2026-01-13 11:35:51 -05:00
Dan Stillman
689e59f161 Update global schema
Remove "Creator" from "Audio Recording"
2025-12-26 23:45:24 -05:00
Dan Stillman
0320a45d46 Show more granular error for generateItemJSONData() test 2025-12-26 23:36:09 -05:00
Dan Stillman
3256273015 Update global schema
"Uploader" → "Creator" on Video Recording
2025-12-26 23:35:43 -05:00
Dan Stillman
22d4bdcef8 Revert treating "arXiv ID" as a field in Mendeley import 2025-12-26 15:55:45 -05:00
Dan Stillman
f0ff173ad2 Update global schema to remove arXivID field 2025-12-26 15:36:13 -05:00
Dan Stillman
7ac22dbef2 Fix creator extraction from Extra
Creators shouldn't be extracted if creators of the same type already
exist on the item, to follow citeproc-js behavior, but the code to do
that was broken.
2025-12-26 11:08:19 -05:00
Dan Stillman
d1fd7c998b Fix Mendeley import test after new identifier fields 2025-12-25 22:37:14 -05:00
Dan Stillman
f7764ca9a4 Recognize "arXiv" for arXiv ID in Extra 2025-12-25 22:37:14 -05:00
Dan Stillman
7487595e6a Fix test error after adding type to document 2025-12-25 22:13:34 -05:00
Dan Stillman
b94dac5586 Update sample data for new item fields 2025-12-25 00:20:34 -05:00
Dan Stillman
0692985c80 Don't upload tags on item conflict if only tag order has changed 2025-12-24 22:00:07 -05:00
windingwind
e522f6185e
Add note as tab (#5528) 2025-12-18 23:49:42 -05:00
abaevbog
f1c7b7939c
Citation dialog: allow to switch between "Add Note" and "Add/Edit Citation" (#5586)
Allow one to switch between "Add/Edit Citation" and "Add Note" modes
in the citation dialog via segmented control in the bottom
left corner.

One cannot switch modes when editing an existing citation or
when inserting a citation in the note editor.

Use the same segmented control UI to switch between
list and library modes for clarity. Replace icons with
"List" and "Library" strings.

Collect some of the state variables into DIALOG_STATE object
for better organization.

Fixes: #5582

Also, remove earlier logic of not resizing window on refocus
on Linux if focus was lost <100ms ago. That workaround
no longer works, and now that we retain the window sizing
after search reruns, it is less of an issue.
Addresses: #5590
2025-12-18 23:18:35 -05:00
Adomas Venčkauskas
3dec4217aa Fix remaped styles not working in Document Preferences dialog
If you're writing a document and a citation style is renamed
Zotero-side, then the citation dialog won't load with the style
preselected without this
2025-12-16 16:33:45 +02:00
abaevbog
ae9330b513
Fix no onActivate handling on double click of collectionTree rows (#5656)
After 015769a removed pointer-events: none from table cells,
clicking on the collectionTree would always trigger
a focusout event, ZoteroPane.handleBlur would call
collectionTree.setHighlightedRows, which would always
redraw the collectionTree. This complete tree redraw on
every click made it impossible to register double-clicks.

With this change, setHighlightedRows won't have
any effect if called with the same rows to highlight
as before (including no rows).
Without constant tree redraws, double-clicks fire as expected.

Fixes: #5655
2025-12-15 23:11:53 -05:00
abaevbog
e6068833ae
Properly display annotations as rows of relatedBox (#5585)
Fixes: zotero#5583
2025-12-12 14:55:27 -05:00
abaevbog
11223451d2
set libraryID on annotations in tests (#5644)
Fix tests breakage post 84764570f4
2025-12-04 08:27:57 -05:00
Abe Jellinek
84764570f4
Enforce annotationSortIndex format by type (#5641) 2025-11-25 12:59:09 -05:00
Tom Najdek
49325e27d9
Fix attachment matching filename isn't correctly retitled (#5637) 2025-11-17 10:40:38 -05:00
windingwind
2f2dfc9038
Fix should discard attachment pane preview after becoming invisible (#5630)
fix: #5624
2025-11-17 10:39:32 -05:00