Post-commit transaction boundary for Zotero plugin

44 views
Skip to first unread message

Donna Cox Baker

unread,
Sep 8, 2026, 3:05:45 PMSep 8
to zoter...@googlegroups.com
We are building a small local plugin that records Zotero item/collection changes for an external local process.   

`Zotero.Notifier` appears to give us the needed change/delete events, but observers do not receive a transaction ID or transaction-complete signal. Our prototype therefore buffers Notifier events and uses `Zotero.DB.addCallback("commit", ...)` / `"rollback"` to seal or discard the transaction batch.

Could you clarify:

1. Is `Zotero.DB.addCallback` intended for third-party plugin use in Zotero 10+?
2. Can a plugin rely on a DB commit callback registered during normal plugin startup running after Zotero’s Notifier commit processing?
3. If not, is there a supported way to observe a completed transaction or completed Notifier batch?
4. For permanent item/collection deletion, may plugins rely on delete notifications retaining the object key and library ID?

We use the documented Local API for object bodies and `Zotero.Server.Endpoints` for local communication.

Thanks,
Donna Baker

Dan Stillman

unread,
Sep 8, 2026, 3:09:19 PMSep 8
to zoter...@googlegroups.com
Notifier events are already batched automatically during transactions. You shouldn't have to do anything to handle this.

But I'm not sure why you'd be using a plugin to record changes instead of just making requests to either the web API or the local API for changed objects since the last check.

- Dan

Donna Cox Baker

unread,
Sep 8, 2026, 4:35:21 PMSep 8
to zoter...@googlegroups.com
Thanks, Dan. That helps.

The reason we are experimenting with a plugin has to do specifically with permanent deletions. For creates/modifications we can use the Zotero 10 Local API with ?since=<version>, and we understand that its local versions advance once per library per transaction.

What we have not been able to establish is whether the Local API provides an authoritative deletion delta comparable to the Web API’s:

GET <userOrGroupPrefix>/deleted?since=<version>

In particular, does that work against Zotero 10’s local version numbers and return permanently deleted item/collection keys for local changes, including deletions that have not been synced to zotero.org?

If so, then we may not need the plugin at all.

And thank you for confirming that Notifier events are already transaction-batched. That's a help.

Thanks!

Donna



--
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/010001a0826cabb8-c979673f-020e-41aa-89da-259fb2ecc646-000000%40email.amazonses.com.
Reply all
Reply to author
Forward
0 new messages