zotero://select links not working with many items
dstillman
Zotero Team
This discussion was created from comments split from: Feature request - Allow multiple item selection with zotero://select/.
Upgrade Storage
I just tested this in Zotero 5.0.88 on Windows 7, by selecting all items in Zotero and extracting their keys:
let selectedItems = ZoteroPane.getSelectedItems();
let keys = "";
for (i = 0; i < selectedItems.length; i++) {
keys = [keys, ZoteroPane.getSelectedItems()[i].libraryKey].join(",");
}
return keys.replace(/1\//g,"").replace(/^,/,"");
For my library with >2400 items, entering the
zotero://select/library/items?itemKey=link in the Firefox 78.0.2 address bar only selects the first 227 items in the string. With Google Chrome 84.0.4147.89, the link silently fails (Zotero doesn't come to the foreground), unless the link is truncated to 223 items or fewer (a 223 item select string is 2044 characters).Do you think this is a Zotero issue? https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers suggests most modern browsers can handle longer URLs.
If this can't be fixed easily I can always modify Reference Extractor to chop up big select links in multiple links that each select no more than ca. 200 items.
Can you provide a Debug ID for clicking on a select link that doesn't work?
I'll try the Debug ID when I'm back on Windows.
(and yes, I offer users in-browser select links: https://twitter.com/rintzezelle/status/1143315626079006722)
P.S. The user who first reported the issue used Windows 10 and Google Chrome, and they also experienced silent failure (Zotero doesn't pop to the front and no items are selected).
(Found this post after I posted and discovered an open GitHUb ticket).