rmzelle / ref-extractor

Reference Extractor - Extract Zotero/Mendeley references from Microsoft Word files
https://rintze.zelle.me/ref-extractor/
MIT License
328 stars 20 forks source link

Possible Issue with Zotero Update #40

Closed dstark closed 1 month ago

dstark commented 2 years ago

Reference Extractor's "Select in Zotero" function works fine in 5.0.97-beta.61+d955a77e9 (Windows 11). But the same references from the same document aren't selected with 5.0.97-beta.63+035aac30f (Windows 10).

Has something with the interaction between Reference Extractor and Zotero broken in the latest Zotero beta update?

rmzelle commented 2 years ago

Are you using the same browser for both Windows versions, and does your document have a lot of references? For documents with a lot of references (>200), there are some known issues under Windows with different behavior between browsers (somehow the select link doesn't make it intact to Zotero). See https://github.com/rmzelle/ref-extractor/issues/35#issue-713253557.

At a glance, I don't see anything between those two commits with a likely impact on the select item functionality of Zotero (https://github.com/zotero/zotero/compare/d955a77e986aa0e2dd6c4b3f50b43e40cb3bc56d...035aac30f2c0a207af8f62a0072df84b522b53aa), so Zotero might not be to blame.

dstark commented 2 years ago

The document only has two references and, yes, I'm using the same browser in both cases (the latest Chromium-based Edge; 96.0.1054.62, 64-bit).

That said, apparently it isn't Zotero's fault, just as you've suggested. The Windows 11 machine I mentioned has now gotten the update to Zotero 5.0.97-beta.63+035aac30f. But reference extractor still works. And it still doesn't work on the Windows 10 machine running the same browser and Zotero version. On the Windows 10 machine, I've tried Reference Extractor in Firefox (95.0.2) as well for kicks per #35, and still nothing gets selected in Zotero.

OS particulars for the Windows 10 machine are below if those are helpful, or if I can provide any other information, please feel free to ask.

Edition Windows 10 Pro Version 21H2 Installed on ‎21-‎Nov-‎20 OS build 19044.1415 Experience Windows Feature Experience Pack 120.2212.3920.0

rmzelle commented 2 years ago

Thanks for the detailed info. One more troubleshooting step is to compare the links that Reference Extractor produces on both machines, and confirm they're the same. It should look something like "zotero://select/library/items?itemKey=UXNYRUQJ,6JF2HFVD". Right-clicking the "Select X item(s) for user library XX" link should do the trick. You can also completely eliminate the browser by making an active link in a different application (like Word), and clicking that.

If the links are the same, suspicion would land back on Zotero, and it might be time to ask one of their developers to take a look.

dstark commented 2 years ago

Ah, good call. I did look at the links but didn't think to compare them. They're identical as shown below:

rmzelle commented 2 years ago

Oh, and are the Zotero libraries synced on both machines using Zotero Sync? If you copied your library via an export/import, Zotero would assign new item keys (e.g. "NXS64DG8") to the imported items.

dstark commented 2 years ago

Sorry it took me a couple days to get back to this. Yes, the two libraries are synced using Zotero sync—though just for the databases, not for attachments also.

rmzelle commented 2 years ago

If you have Word on both machines, one more troubleshooting step would be to make a new Word document on each machine with one Zotero reference from that machine's Zotero library, and then checking if each document works properly with Reference Extractor on both machines (both the one on which it was created and the other one).

dstark commented 2 years ago

Yes, I do have Word on both machines with the following results:

rmzelle commented 2 years ago

@dstark, thanks!

@dstillman, I have a report here of an unexplained (silent) error with Zotero item selection under Windows 10, whereas things work under Windows 11 with the same synced Zotero library. I'm pretty sure Reference Extractor is not involved in the difference in behavior. Any further troubleshooting ideas, or thoughts on what might have broken?

rmzelle commented 2 years ago

@dstark, if you click on a selection link on your Windows 10 machine with Zotero closed, does Zotero launch?

dstark commented 2 years ago

@rmzelle, yes, Zotero does launch on the Windows 10 machine in that scenario. But after the library loads, still none of the sources cited in the document are selected.

rmzelle commented 2 years ago

Well, that at least tells us that Zotero receives the URL on the Windows 10 machine, but seems to have some kind of internal issue preventing item selection.

dstillman commented 2 years ago

@dstark: Can you provide a Debug ID from Zotero for clicking a zotero://select link?

dstark commented 2 years ago

Sure, @dstillman. I believe I've done this successfully on the mis-behaving Windows 10 machine. The Debug ID is D2142013669. If you need me to do the same on the Windows 11 machine, please just let me know.

Thank you so much!

dstillman commented 2 years ago

This shows Zotero switching to the library root, but that's it. Does it work if the library root is already selected?

Also be sure you've tried with all third-party plugins disabled.

dstark commented 2 years ago

No, nothing gets selected on the Windows 10 machine even if the library root is already selected. And in doing that debug report, I manually switched to the library root at one point while logging to try Reference Extractor again. As I'm trying it now, if I'm in a subfolder, Zotero doesn't automatically switch to the library root. And it says it's logging zero lines. If I start in the library root and try again, it also says it's logged zero lines.

This behavior persists even with all plugins disabled (except for the built-in word processor integration).

If I can provide anything further, please feel free to ask. Thank you so much!

rmzelle commented 1 month ago

Closing this issue as it's so stale.

dstark commented 1 month ago

Closing this issue as it's so stale.

Sounds good. I was able to use Reference Extractor recently in v7 without issue. Thanks so much!