Find a file
Northword b20084be43
Fix(Plugins): Prevent user preferences from being lost on plugin disable (#5646)
When a Zotero plugin is disabled, user-modified preferences can be inadvertently reset to their default values. This occurs under specific conditions where a parent preference has not been user-modified, but a child preference within that branch *has* been modified.

The root cause lies in the `Zotero.Plugins.clearDefaultPrefs` function. For preferences that do not have a user-set value (`!branch.prefHasUserValue(pref)`), it incorrectly calls `Services.prefs.getDefaultBranch('').deleteBranch(pref)`. While intended to clear unmodified defaults, `deleteBranch(pref)` operates on the *entire preference branch* starting with `pref`, inadvertently removing any user-modified sub-preferences as well.

This commit changes the problematic line from `branch.deleteBranch(pref)` to `branch.clearUserPref(pref)`. `clearUserPref(pref)` correctly removes only the user-set value for the *specific* preference `pref`, leaving default values and any user-modified sub-preferences intact. This ensures that only truly unmodified default preferences are cleared, preserving user data for related sub-preferences.

This fix prevents unintended loss of user settings when plugins are disabled.
2025-12-16 23:06:18 -05:00
.github/workflows Remove issue template 2025-02-10 23:25:03 -05:00
app Update Word for Mac submodule 2025-12-04 10:25:58 +02:00
chrome Fix(Plugins): Prevent user preferences from being lost on plugin disable (#5646) 2025-12-16 23:06:18 -05:00
defaults/preferences Automatically show post-upgrade banner for each new major version 2025-12-16 13:50:27 -05:00
js-build Add special handling for general-sentence-separator string 2025-10-09 15:32:04 -04:00
note-editor@1f1e9bfca8 Update note-editor and reader submodules 2025-12-16 10:42:48 -05:00
pdf-worker@fd642b3828 Update pdf-worker submodule 2025-12-11 13:07:04 +00:00
reader@053446bdf5 Update note-editor and reader submodules 2025-12-16 10:42:48 -05:00
resource Automatically show post-upgrade banner for each new major version 2025-12-16 13:50:27 -05:00
scripts Update asyncify script to handle more Mocha hooks 2025-07-30 22:30:57 -04:00
scss Bold only "Zotero 8" in the post-upgrade banner 2025-12-16 14:16:45 -05:00
styles@447420ac0a Update translators, styles, and CSL locales 2025-12-16 10:42:48 -05:00
test Fix remaped styles not working in Document Preferences dialog 2025-12-16 16:33:45 +02:00
translators@2e13e9407d Update translators, styles, and CSL locales 2025-12-16 10:42:48 -05:00
types/gecko fx140: Update type definitions 2025-07-30 22:30:37 -04:00
.babelrc Use production builds of react libraries (#4482) 2024-08-02 03:43:02 -04:00
.gitattributes Update Linux updater for Zotero 7 2023-05-20 10:51:47 +00:00
.gitignore Use user-provided codesign script for Windows signing 2024-04-08 10:12:58 +01:00
.gitmodules Remove chai-as-promised submodule 2025-03-05 22:59:49 -05:00
chrome.manifest Remove old citation dialogs (#5177) 2025-04-02 05:26:06 -04:00
CONTRIBUTING.md Add "support questions" to CONTRIBUTING.md 2022-12-01 05:10:42 -05:00
COPYING Update COPYING 2018-03-26 11:27:48 +02:00
eslint.config.mjs Replace CSL validator with reproducible WASM build (#5525) 2025-08-29 00:40:41 -04:00
package-lock.json Replace CSL validator with reproducible WASM build (#5525) 2025-08-29 00:40:41 -04:00
package.json Replace CSL validator with reproducible WASM build (#5525) 2025-08-29 00:40:41 -04:00
README.md "Zotero wiki" → "Zotero documentation" in app build README 2023-04-26 04:40:22 -04:00
update.rdf Update Fx minVersion to 45 2016-12-13 09:12:55 -05:00
version Update version to 8.0 2025-07-30 22:30:54 -04:00

Zotero

CI

Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Please post feature requests or bug reports to the Zotero Forums. If you're having trouble with Zotero, see Getting Help.

For more information on how to use this source code, see the Zotero documentation.