Zotero linking question again!

I have recently discovered that Hook can link with Zotero (I have discovered the script in the Scripts of Hooks), and I was very happy. But unfortunately, this does not seem to work anymore. Hook finds nothing and the problem seems in the communication with Zotero and zotxt (see below).

I tried to use it with OSX Big Sur and Zotero and the last version of zotxt installed in Zotero.
I executed the curl instruction in the console and it was not happy.

Then I execute in Firefox, and I get “Request not allowed”

That also seems to impede Hook working because it relies on zotxt, and Hooks finds nothing when I select a document in Zotero and click on the Hook item in the menu bar.

That is a disappointment, because I use quite a lot Zotero. Maybe I should only link to the bibdesk items…

I have checked this post too

but its does not yet signal such a problem. It is probably a problem appeared with the recent versions of Zotero and/or zotxt. I have informed the author of zotxt but he does not use a Mac normally, given what I have understood from his answers to other users meeting similar problems.

Hello myildi

The input/output in the terminal window should look like this:

brock@msslmaj ~ % curl -s -d selected=t&format=key -G

The key number will be different of course.

What output do you get from curl that indicates that it is ’not happy’?

When I try and go to in a browser, I also get ‘Request not allowed’, so I think that is just down to zotext responding to a query from a browser, instead of getting the information in the -d parameter (selected and format). So it sounds like zotext is running - I tried altering the port number and get a different response, so zotext does seem to be listening on port 23119.

Post what curl returns for you and it might give a clue.

Regards, David

Thanks a lot David!
I get a similar output now. There was a problem with escaping of & we need selected=t\&format

So, zotxt seems to work. But Hook does not find any linkable item nevertheless.


When I execute this script in Script debugger, I get an error message for the line

set theLink to item 2 of theTextItems

Where it seems that the script gets a list of one item only.

To follow up. If I change the script in Hook, so it points to the item 1, Hook finds something and is able to create a link.
But when I click on the link on my markdown document, I get my whole library in Zotero.

With set theLink to item 1 of theTextItems
set theLink to “[” & theName & “](zotero://select/library/items/” & theLink & “)”
return theLink

I get as link

[Future Scenarios for the European Higher Education Area: Exploring the Possibilities of “Experimentalist Governance”](zotero://select/library/items/harmsen2015)

When I click on this link, I switch to Zotero but with all the documents selected in the root folder of my library in the Zotero window.

I continue to try to locate the source of this discrepancy. It seems that the curl command only returns the cite-key as id in my case, instead of the internal Zotero id of the document (that seems to correspond on the name of the subfolder where it is saved in the storage folder of Zotero).

When I execute
instead of
Zotero focuses indeed on the corresponding item in the database.

When I check the full result of the curl command, saved in zotext_result, I indeed do not see the first reference anywhere.

I use Betterbibtex. Would it be the source of this discrepancy? I have tried to check its preferences but I have not been able to see anything about the id field.

To conclude, I confirm that BetterBibTeX was messing with the ids.

I have deactivated it, restarted Zotero and now the obtained link has the correct id for internal referencing.

I have also informed the creator of Better BibTeX.

1 Like

Thanks for all this, we have replicated all this too. We will update our documentation for this situation. For now, to use Hook with Zotero, users need to disable BetterBibTex. Once Betterbibtex fixes its problem, we might need to provide a different version of script for this, depending on the id format it returns.

Hello Luc,
Just to complete the information, the developer of BBTex has told me that BBTx does not change these links and that the problem probably originates from the interaction between BBTX and Zotxt, the latter seeing that BBTX is installed, and using the tools given by it.
I have signaled this issue in Zotxt’s github pages.

1 Like

I’m curious if this has been resolved? I didn’t find the github issue and am having the same problem.

I have switched to the beta version 6.0-beta.1+c6d03753f and it has been working.

1 Like

I switched off BetterBibTex in the addons and it works fine for me now.

Many thanks all for the contributions. We have rolled out the integration. Sorry for the delay.