Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero URI links result in "page not found" error #172

Closed
dvanoni opened this issue Nov 16, 2022 · 18 comments · Fixed by #409
Closed

Zotero URI links result in "page not found" error #172

dvanoni opened this issue Nov 16, 2022 · 18 comments · Fixed by #409
Labels
bug Something isn't working

Comments

@dvanoni
Copy link
Owner

dvanoni commented Nov 16, 2022

Describe the issue
When clicking the link in a Zotero URI property in Notion, the user ends up on a Zotero error page with the error message: page not found.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a Notion page created by Notero that includes the Zotero URI property
  2. Click on the link in the Zotero URI property
  3. See the "page not found" error page

Expected behavior
Clicking the link opens the desired item in the Zotero web library.

Screenshots

CleanShot.2022-11-15.at.21.59.44.mp4
@dvanoni dvanoni added the bug Something isn't working label Nov 16, 2022
@dvanoni
Copy link
Owner Author

dvanoni commented Nov 16, 2022

@dvanoni
Copy link
Owner Author

dvanoni commented Nov 20, 2022

Response from Dan Stillman (Zotero team) in the forums:

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.)

@sheldon123z
Copy link

Hi @dvanoni ,

my way for solving this issue is to use a chrome add-on called "URL redirect for developers" as a middle point to open the zotero application and find the item.

the code to import into the add-on is shown below:

{
  "settingsSchemaVersion": 1,
  "enabled": true,
  "removeCSPRules": [],
  "redirectRules": [
    {
      "enabled": true,
      "fromPattern": "*://www.zotero.org/{user}/items/{id}",
      "toPattern": "zotero://select/library/items/{id}"
    },
    {
      "enabled": true,
      "fromPattern": "http://zotero.org/users/{user}/items/{id}",
      "toPattern": "https://www.zotero.org/{user}/items/{id}"
    }
  ]
}

add the extension from chrome extension market
image

click the import button and paste the codes shown above
image

As long as the chrome open, click on the "zotero url" the chrome will redirect back to the zotero application and find the item it points to.

@sheldon123z
Copy link

it works for me since almost all the time when I use zotero, I also keep the chrome on.

2.mov

@dvanoni dvanoni added this to Notero Dec 13, 2022
@dvanoni dvanoni moved this to Todo in Notero Dec 13, 2022
@austinmw
Copy link

Also facing this problem.

@vadbars
Copy link

vadbars commented Feb 11, 2023

The problem has not been solved?

@dvanoni
Copy link
Owner Author

dvanoni commented Feb 12, 2023

I haven't had time to get to this one yet, but it's on the todo list!

@austinmw
Copy link

By the way, happen to have any experience using LiquidText? I'd love to figure out a way to also add liquidtext links to this database. For example:

[[GFM](lt://openProj/F76A9861-A78F-4BE3-973E-6D511348F1A7)](lt://openProj/F76A9861-A78F-4BE3-973E-6D511348F1A7)

@dvanoni
Copy link
Owner Author

dvanoni commented Feb 14, 2023

@austinmw, unfortunately, it looks like Notion still only supports http and https links.

You could try using the Chrome extension that @sheldon123z mentioned above with something like the following:

From: http://openProj/{projId}
To: lt://openProj/{projId}

Then, when you paste one of those LiquidText links into Notion, you'd need to replace the leading lt with http so that Notion will recognize it as a link.

I haven't used the extension myself, so I'm not sure if I have it quite right, but let me know if you give it a try!

@austinmw
Copy link

Thanks for the advice, going to play with this later today!

@dvanoni
Copy link
Owner Author

dvanoni commented Mar 23, 2023

Another URL redirect tool was shared here: #78 (comment)

@yjavaherian
Copy link

Hi. thanks for this awesome tool.
I propose a little hint on README about this issue.
I started using this plugin today and was confused about why the links were not working.

@alvorithm
Copy link

alvorithm commented May 5, 2023

If you're using Firefox, the extension Firefox Redirector provides a workaround. I had success with the following wildcard rule:

Redirect: https://www.zotero.org/users/*/items/*
To: zotero://select/library/items/$2

@Skywuuuu
Copy link

@sheldon123z Hi, could you please share the link to the Chrome add-on you use? I cannot find it on Chrome extension market. xiexie.

@sheldon123z
Copy link

sheldon123z commented Sep 4, 2023

@Skywuuuu

@sheldon123z Hi, could you please share the link to the Chrome add-on you use? I cannot find it on Chrome extension market. xiexie.

sorry for reply so late, I didn't see your message, here is the extension github page, it seems like already removed from Chrome extension market. Please copy & paste the codes I provided, it should work.

https://github.com/wavebeem/url-redirect-webextension

@sheldon123z
Copy link

@Skywuuuu

Another point for achiving this is that keep your browser and Zotero application open at the same time, then you can click the Zotero link on notion, the browser will redirect you to Zotero and have the correct item selected.

@sheldon123z
Copy link

@dvanoni
Copy link
Owner Author

dvanoni commented Dec 27, 2023

This should be fixed in v0.5.6! Please let me know if you have any trouble with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
7 participants