Zotero http links result in "page not found"

I've been developing the Notero plugin, and one of my users informed me that the Zotero http links are directing to a "page not found" error page.

For example, my plugin uses the Zotero.URI.getItemURI() function to output a link like the following:

http://zotero.org/users/8509743/items/XN4SL8R5

I thought that these links used to direct to the Zotero web library, but now I'm not sure if I'm misremembering. Did something change recently such that these links will no longer correctly direct to the web library? Is there a recommended function to use in Zotero for generating links to items in the web library?

Thanks!
  • edited November 16, 2022
    Yes, sorry, we had to shut those off due to abuse (though note that, while getItemURI() worked in practice, it was never guaranteed to provide a web link — that's just a URI to identify the item).

    The web API provides the canonical web library URL for every item in links.alternate.href.

    For the client, we'll add a function to get web library links using the username slug. For now, you can use Zotero.Users.getCurrentUsername() and apply the same transformation we use for the API. (There won't be a username if the person hasn't synced.)
  • Thanks for the info, Dan. That makes sense! I can work with that. :)
  • Hello! I'm one of the clients of notero and wanted to ask if you could clarify how in the interim we can link notero entries to zotero web library entries; I might be misreading but the solution here seemed to be for the developer?
  • The URL is the same except that they are https and that the [users/userID] user ID (i.e./users/8509743 above, users/1766229 in your case) gets replaced by the username, so the above would be
    https://www.zotero.org/dvanoni/items/XN4SL8R5

    and an (made up) item in your library would be

    https://www.zotero.org/mlpsheldon/items/73NV7SBA instead of the
    http://www.zotero.org/users/1766229/items/73NV7SBA you're currently getting

    So two simple search & replace functions will work for individual users.
Sign In or Register to comment.