prefs.js not loaded

17 views
Skip to first unread message

maie...@gmail.com

unread,
4:53 AM (11 hours ago) 4:53 AM
to zotero-dev
Hi,
I've updated my plugin for Zotero 8 and for some reason the settings from prefs.js don't seem get loaded anymore. I really can't see where it's going off the rails here...

If I understand correctly, the values in prefs.js should be loaded by default, right?

Best,
Denis

maie...@gmail.com

unread,
4:58 AM (10 hours ago) 4:58 AM
to zotero-dev

Also: I've noticed that the settings get loaded upon a fresh installation of the plugin but an update of the installed plugin or disabling/reenabling doesn't seem to trigger a reload of prefs.js.

Is there a problem with my code or is that a bug or even by design?

Xiangyu Wang

unread,
4:58 AM (10 hours ago) 4:58 AM
to zoter...@googlegroups.com
There is no specific change regarding the prefs.js loading in Zotero 8. Please check your plugin XPI structure and make sure the file has correct formatting (for example, each line per pref instead of automatically formatted in wrong way by tools like eslint).

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/zotero-dev/f16be271-39f3-4679-a33e-4334c8367496n%40googlegroups.com.

Xiangyu Wang

unread,
5:04 AM (10 hours ago) 5:04 AM
to zoter...@googlegroups.com
If I understand correctly, do you mean you have the prefs.js value changed but reinstalling the plugin with the changes doesn’t update the default prefs?


--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.

maie...@gmail.com

unread,
5:10 AM (10 hours ago) 5:10 AM
to zotero-dev

I have changed the pref key (not the values). I’ve migrated the whole plugin to https://github.com/zotero-plugin-dev/zotero-plugin-scaffold and changed a couple of things in the process. The old keys are still there, but the new keys seem not to be added.

 

So:

Updating the plugin -> the new keys don’t show up

Disbling/Enabling the plugin -> the new keys don’t show up

Uninstalling/Reinstalling the plugin -> the new keys shop up

iseexuhs

unread,
5:14 AM (10 hours ago) 5:14 AM
to zoter...@googlegroups.com
I also found this. This issue has existed for a long time with Zotero 7/8/9.  Zotero with Version < 7.0.15 has no this problem.

Specifically, a newly added pref could only be loaded after the plugin is installed twice. If the plugin is installed one time, the new pref will be read as undefined. 

And I tested this in many plugins (including translate for Zotero), the issue always existed.

Xiangyu Wang <hsiang...@gmail.com>于2026年3月31日 周二16:58写道:

Xiangyu Wang

unread,
5:17 AM (10 hours ago) 5:17 AM
to zoter...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages